diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 94ed36bbda..0000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster -ARG VARIANT=1.20-bullseye -FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT} - -# [Optional] If your requirements rarely change, uncomment this section to add them to the image. -# COPY requirements.txt /tmp/pip-tmp/ -# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ -# && rm -rf /tmp/pip-tmp - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - - - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 75a2faa492..0000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,30 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/python-3-postgres -// Update the VARIANT arg in docker-compose.yml to pick a Python version -{ - "name": "sqlc", - "build": { - "dockerfile": "Dockerfile" - }, - - "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], - - // Set *default* container specific settings.json values on container create. - "settings": { - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true, - "go.gopath": "/go", - "go.goroot": "/usr/local/go" - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "golang.Go", - ], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [5000, 5432], - - // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode" -} diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 8472dcb7d6..79381df51c 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -1,6 +1,6 @@ name: Bug Report description: File a bug report -labels: [bug, triage] +labels: [bug] body: - type: dropdown id: version @@ -9,15 +9,12 @@ 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 - - 1.19.1 - - 1.19.0 - - 1.18.0 - - 1.17.2 - - 1.16.0 + - 1.30.0 + - 1.29.0 + - 1.28.0 + - 1.27.0 + - 1.26.0 + - 1.25.0 - Other validations: required: true diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 97c36f512d..b3dd5b0a09 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -1,6 +1,6 @@ name: Feature Request description: Request a new feature or a change to an existing feature -labels: [enhancement, triage] +labels: [enhancement] body: - type: textarea id: feature diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f278157e42..ecbac919d7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,11 @@ updates: directory: "/" schedule: interval: "daily" + groups: + production-dependencies: + dependency-type: "production" + development-dependencies: + dependency-type: "development" - package-ecosystem: "docker" directory: "/" schedule: @@ -21,3 +26,9 @@ updates: # sphinx - dependency-name: "docutils" - dependency-name: "sphinx" + groups: + production-dependencies: + dependency-type: "production" + development-dependencies: + dependency-type: "development" + diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml index 05507b05ba..7b7ef08214 100644 --- a/.github/workflows/buf.yml +++ b/.github/workflows/buf.yml @@ -4,6 +4,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: bufbuild/buf-setup-action@v1 - uses: bufbuild/buf-lint-action@v1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..96d26bdd1a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: build +on: + workflow_dispatch: +jobs: + build: + strategy: + matrix: + os: [ubuntu-24.04, macos-14, windows-2022] + name: build ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 + with: + go-version: '1.25.0' + - name: install ./... + run: go build ./... + env: + CGO_ENABLED: "0" diff --git a/.github/workflows/ci-kotlin.yml b/.github/workflows/ci-kotlin.yml index c88a9815e6..3436f70b24 100644 --- a/.github/workflows/ci-kotlin.yml +++ b/.github/workflows/ci-kotlin.yml @@ -5,48 +5,23 @@ on: - main pull_request: jobs: - build: + if: false name: test runs-on: ubuntu-latest - - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mysql: - image: mysql:8 - env: - MYSQL_ROOT_PASSWORD: mysecretpassword - MYSQL_DATABASE: mysql - ports: - - 3306:3306 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 with: - distribution: 'adopt' - java-version: '11' - - uses: eskatos/gradle-command-action@v2 - env: - PG_USER: postgres - PG_HOST: localhost - PG_DATABASE: postgres - PG_PASSWORD: postgres - PG_PORT: ${{ job.services.postgres.ports['5432'] }} - MYSQL_DATABASE: mysql - MYSQL_HOST: localhost - MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} - MYSQL_ROOT_PASSWORD: mysecretpassword + go-version: '1.24.1' + - name: install ./... + run: go install ./... + - uses: actions/checkout@v5 with: - build-root-directory: examples/kotlin - wrapper-directory: examples/kotlin - arguments: test --scan + repository: sqlc-dev/sqlc-gen-kotlin + path: kotlin + - run: make test + working-directory: kotlin + - run: sqlc diff + working-directory: kotlin/examples + diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 0edb94092a..a2cb587392 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -5,40 +5,22 @@ on: - main pull_request: jobs: - build: + if: false name: test runs-on: ubuntu-latest - - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 with: - python-version: 3.9 - - name: Install python dependencies - working-directory: ./examples/python - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - - name: Test python code - working-directory: ./examples/python - env: - PG_USER: postgres - PG_HOST: localhost - PG_DATABASE: postgres - PG_PASSWORD: postgres - PG_PORT: ${{ job.services.postgres.ports['5432'] }} - run: | - pytest src/tests + go-version: '1.24.1' + - name: install ./... + run: go install ./... + - uses: actions/checkout@v5 + with: + repository: sqlc-dev/sqlc-gen-python + path: python + - run: make test + working-directory: python + - run: sqlc diff + working-directory: python/examples diff --git a/.github/workflows/ci-typescript.yml b/.github/workflows/ci-typescript.yml new file mode 100644 index 0000000000..7ce0ee690f --- /dev/null +++ b/.github/workflows/ci-typescript.yml @@ -0,0 +1,26 @@ +name: typescript +on: + push: + branches: + - main + pull_request: +jobs: + build: + if: false + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 + with: + go-version: '1.24.1' + - name: install ./... + run: go install ./... + - uses: actions/checkout@v5 + with: + repository: sqlc-dev/sqlc-gen-typescript + path: typescript + # v0.1.3 + ref: daaf539092421adc15f6c3164279a3470716b560 + - run: sqlc diff + working-directory: typescript/examples diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edef06cd6c..2c3d89fc5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,45 +5,30 @@ on: - main pull_request: jobs: - windows-build: - if: ${{ github.ref == 'refs/heads/main' }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 - with: - go-version: '1.21.3' - - run: go build ./... - - darwin-build: - if: ${{ github.ref == 'refs/heads/main' }} - runs-on: macos-latest + build: + strategy: + matrix: + goos: [darwin, linux, windows] + goarch: [amd64, arm64] + name: build ${{ matrix.goos }}/${{ matrix.goarch }} + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 with: - go-version: '1.21.3' + go-version: '1.25.0' - run: go build ./... - - build: - name: test - runs-on: ubuntu-latest - - services: - mysql: - image: "mysql/mysql-server:8.0" - env: - MYSQL_DATABASE: mysql - MYSQL_ROOT_HOST: '%' - MYSQL_ROOT_PASSWORD: mysecretpassword - ports: - - 3306:3306 - + env: + CGO_ENABLED: "0" + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + test: + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 with: - go-version: '1.21.3' + go-version: '1.25.0' - name: install gotestsum run: go install gotest.tools/gotestsum@latest @@ -51,38 +36,32 @@ jobs: - name: install sqlc-gen-test run: go install github.com/sqlc-dev/sqlc-gen-test@v0.1.0 + - name: install test-json-process-plugin + run: go install ./scripts/test-json-process-plugin/ + - name: install ./... run: go install ./... - - - name: test ./... - run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./... env: - MYSQL_DATABASE: mysql - MYSQL_HOST: localhost - MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} - MYSQL_ROOT_PASSWORD: mysecretpassword - CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }} - CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }} - SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }} + CGO_ENABLED: "0" - name: build internal/endtoend run: go build ./... working-directory: internal/endtoend/testdata + env: + CGO_ENABLED: "0" - - name: report - if: false - run: ./scripts/report.sh + - name: test ./... + run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./... + if: ${{ matrix.os }} != "windows-2022" env: - BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }} + CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }} + CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }} + SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }} + CGO_ENABLED: "0" vuln_check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 - with: - go-version: '1.21.3' - - run: go install golang.org/x/vuln/cmd/govulncheck@latest - - run: govulncheck ./... + - uses: golang/govulncheck-action@v1 diff --git a/.github/workflows/gen.yml b/.github/workflows/gen.yml index d2bac940dd..f9a32e27ba 100644 --- a/.github/workflows/gen.yml +++ b/.github/workflows/gen.yml @@ -17,10 +17,11 @@ jobs: # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-go@v5 with: - go-version: '1.21.3' + go-version-file: go.mod + check-latest: true - run: go build -o sqlc-pg-gen ./internal/tools/sqlc-pg-gen - run: mkdir -p gen/contrib - run: ./sqlc-pg-gen gen @@ -31,7 +32,7 @@ jobs: PG_PASSWORD: postgres PG_PORT: ${{ job.services.postgres.ports['5432'] }} - name: Save results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sqlc-pg-gen-results path: gen diff --git a/Dockerfile b/Dockerfile index 160fc2a163..588399b6b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # STEP 1: Build sqlc -FROM golang:1.21.3 AS builder +FROM golang:1.25.0 AS builder COPY . /workspace WORKDIR /workspace @@ -13,7 +13,7 @@ ENV VERSION=$version RUN go run scripts/release.go -docker # STEP 2: Build a tiny image -FROM scratch +FROM gcr.io/distroless/base-debian12 COPY --from=builder /workspace/sqlc /workspace/sqlc ENTRYPOINT ["/workspace/sqlc"] diff --git a/LICENSE b/LICENSE index 335c6d24e1..4d86f4d24d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Kyle Conroy +Copyright (c) 2024 Riza, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index 3f1245147e..b8745e57dc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build build-endtoend test test-ci test-examples test-endtoend regen start psql mysqlsh proto +.PHONY: build build-endtoend test test-ci test-examples test-endtoend start psql mysqlsh proto build: go build ./... @@ -9,6 +9,9 @@ install: test: go test ./... +test-managed: + MYSQL_SERVER_URI="invalid" POSTGRESQL_SERVER_URI="postgres://postgres:mysecretpassword@localhost:5432/postgres" go test -v ./... + vet: go vet ./... @@ -20,9 +23,6 @@ build-endtoend: test-ci: test-examples build-endtoend vet -regen: sqlc-dev sqlc-gen-json - go run ./scripts/regenerate/ - sqlc-dev: go build -o ~/bin/sqlc-dev ./cmd/sqlc/ @@ -32,6 +32,9 @@ sqlc-pg-gen: sqlc-gen-json: go build -o ~/bin/sqlc-gen-json ./cmd/sqlc-gen-json +test-json-process-plugin: + go build -o ~/bin/test-json-process-plugin ./scripts/test-json-process-plugin/ + start: docker compose up -d diff --git a/README.md b/README.md index 8eb75da8db..43fed122b9 100644 --- a/README.md +++ b/README.md @@ -20,23 +20,44 @@ Check out [an interactive example](https://play.sqlc.dev/) to see it in action, - [Downloads](https://downloads.sqlc.dev/) - [Community](https://discord.gg/EcXzGe5SEs) -## Sponsors - -sqlc development is funded by our [generous -sponsors](https://github.com/sponsors/kyleconroy), including the following -companies: +## Supported languages -- [Context](https://context.app) -- [ngrok](https://ngrok.com) -- [RStudio](https://www.rstudio.com/) -- [時雨堂](https://shiguredo.jp/) +- [sqlc-gen-go](https://github.com/sqlc-dev/sqlc-gen-go) +- [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) +- [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) +- [sqlc-gen-typescript](https://github.com/sqlc-dev/sqlc-gen-typescript) -If you use sqlc at your company, please consider [becoming a -sponsor](https://github.com/sponsors/kyleconroy) today. +Additional languages can be added via [plugins](https://docs.sqlc.dev/en/latest/reference/language-support.html#community-language-support). -Sponsors receive priority support via the sqlc Slack organization. - -## Acknowledgements +## Sponsors -sqlc was inspired by [PugSQL](https://pugsql.org/) and -[HugSQL](https://www.hugsql.org/). +Development is possible thanks to our sponsors. If you would like to support sqlc, +please consider [sponsoring on GitHub](https://github.com/sponsors/kyleconroy). + +

+ Riza.io +

+ +

+ Coder.com + Mint.fun + Mux.com +

+ +

+ Cyberax - + NaNuNaNu - + Stumble - + WestfalNamur - + alecthomas - + cameronnewman - + danielbprice - + davherrmann - + dvob - + gilcrest - + gzuidhof - + jeffreylo - + mmcloughlin - + ryohei1216 - + sgielen +

diff --git a/buf.gen.yaml b/buf.gen.yaml index 63146b4ee3..3acdb97914 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,10 +1,12 @@ version: v1 managed: enabled: true + go_package_prefix: + default: "github.com/sqlc-dev/sqlc/internal" plugins: - plugin: buf.build/protocolbuffers/go:v1.30.0 out: internal opt: paths=source_relative - - plugin: buf.build/community/planetscale-vtprotobuf:v0.4.0 + - plugin: buf.build/grpc/go:v1.3.0 out: internal opt: paths=source_relative diff --git a/buf.yaml b/buf.yaml deleted file mode 100644 index d622cfa1b9..0000000000 --- a/buf.yaml +++ /dev/null @@ -1,8 +0,0 @@ -version: v1 -name: buf.build/sqlc/sqlc -breaking: - use: - - FILE -lint: - use: - - DEFAULT diff --git a/cmd/sqlc-gen-json/main.go b/cmd/sqlc-gen-json/main.go index 421a14e06d..05c804d082 100644 --- a/cmd/sqlc-gen-json/main.go +++ b/cmd/sqlc-gen-json/main.go @@ -9,6 +9,7 @@ import ( "github.com/sqlc-dev/sqlc/internal/codegen/json" "github.com/sqlc-dev/sqlc/internal/plugin" + "google.golang.org/protobuf/proto" ) func main() { @@ -19,19 +20,19 @@ func main() { } func run() error { - var req plugin.CodeGenRequest + var req plugin.GenerateRequest reqBlob, err := io.ReadAll(os.Stdin) if err != nil { return err } - if err := req.UnmarshalVT(reqBlob); err != nil { + if err := proto.Unmarshal(reqBlob, &req); err != nil { return err } resp, err := json.Generate(context.Background(), &req) if err != nil { return err } - respBlob, err := resp.MarshalVT() + respBlob, err := proto.Marshal(resp) if err != nil { return err } diff --git a/devenv.lock b/devenv.lock index 6f61ce9a07..ff48a49f12 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,11 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1693830477, - "narHash": "sha256-6j1oNRpjGseDbgg6mJ9H3gmX5U+VAubOLV+iFL9WW30=", + "lastModified": 1742659231, "owner": "cachix", "repo": "devenv", - "rev": "f839f486b98609f3477c0410b31a6f831b390d48", + "rev": "c651cb04013be972767aaecb3e9a98fc930d080e", "type": "github" }, "original": { @@ -20,11 +19,10 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1733328505, "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "type": "github" }, "original": { @@ -33,24 +31,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -59,11 +39,10 @@ ] }, "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "lastModified": 1709087332, "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -74,11 +53,10 @@ }, "nixpkgs": { "locked": { - "lastModified": 1693844670, - "narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=", + "lastModified": 1742707865, "owner": "NixOS", "repo": "nixpkgs", - "rev": "3c15feef7770eb5500a4b8792623e2d6f598c9c1", + "rev": "dd613136ee91f67e5dba3f3f41ac99ae89c5406b", "type": "github" }, "original": { @@ -88,38 +66,19 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1685801374, - "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils", "gitignore": "gitignore", "nixpkgs": [ "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" + ] }, "locked": { - "lastModified": 1692274144, - "narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=", + "lastModified": 1742649964, "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "type": "github" }, "original": { @@ -134,21 +93,6 @@ "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks" } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/devenv.nix b/devenv.nix index 572e83e198..8a25b78d5a 100644 --- a/devenv.nix +++ b/devenv.nix @@ -4,7 +4,7 @@ # https://devenv.sh/packages/ packages = [ pkgs.buf - pkgs.go_1_21 + pkgs.go_1_24 pkgs.git pkgs.git-cliff pkgs.govulncheck diff --git a/docker-compose.yml b/docker-compose.yml index 3087dcc6b4..f318d1ed93 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.8" services: mysql: - image: "mysql/mysql-server:8.0" + image: "mysql:9" ports: - "3306:3306" restart: always @@ -10,20 +10,8 @@ services: MYSQL_ROOT_PASSWORD: mysecretpassword MYSQL_ROOT_HOST: '%' - mysql5: - image: "mysql/mysql-server:5.7" - ports: - - "3305:3306" - restart: always - environment: - MYSQL_DATABASE: dinotest - MYSQL_ROOT_PASSWORD: mysecretpassword - MYSQL_ROOT_HOST: '%' - profiles: - - mysql - postgresql: - image: "postgres:15" + image: "postgres:16" ports: - "5432:5432" restart: always @@ -31,51 +19,3 @@ services: POSTGRES_DB: postgres POSTGRES_PASSWORD: mysecretpassword POSTGRES_USER: postgres - - postgresql14: - image: "postgres:14" - ports: - - "5414:5432" - restart: always - environment: - POSTGRES_DB: postgres - POSTGRES_PASSWORD: mysecretpassword - POSTGRES_USER: postgres - profiles: - - postgres - - postgresql13: - image: "postgres:13" - ports: - - "5413:5432" - restart: always - environment: - POSTGRES_DB: postgres - POSTGRES_PASSWORD: mysecretpassword - POSTGRES_USER: postgres - profiles: - - postgres - - postgresql12: - image: "postgres:12" - ports: - - "5412:5432" - restart: always - environment: - POSTGRES_DB: postgres - POSTGRES_PASSWORD: mysecretpassword - POSTGRES_USER: postgres - profiles: - - postgres - - postgresql11: - image: "postgres:11" - ports: - - "5411:5432" - restart: always - environment: - POSTGRES_DB: postgres - POSTGRES_PASSWORD: mysecretpassword - POSTGRES_USER: postgres - profiles: - - postgres \ No newline at end of file diff --git a/docs/_static/customize.css b/docs/_static/customize.css index b0882f2a05..62b715840c 100644 --- a/docs/_static/customize.css +++ b/docs/_static/customize.css @@ -14,4 +14,9 @@ #banner > div > a { color: #F0F0F4; text-decoration: underline; -} \ No newline at end of file +} + +#sponsorship > img { + width: 100%; + max-width: 200px; +} diff --git a/docs/_templates/breadcrumbs.html b/docs/_templates/breadcrumbs.html index 29a555c4b8..40a8b82be1 100644 --- a/docs/_templates/breadcrumbs.html +++ b/docs/_templates/breadcrumbs.html @@ -2,9 +2,6 @@ {% block breadcrumbs %} {% if show_banner %} - {% endif %} {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index c83e9b28a4..4b748dd160 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,6 +1,16 @@ {% extends "!layout.html" %} {% block extrahead %} - + {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %} + +{% block menu %} +{{ super() }} +

Sponsored By

+
+ +Riza logo + +
+{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 5e84471d3c..76638e65d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,11 +18,11 @@ # -- Project information ----------------------------------------------------- project = 'sqlc' -copyright = '2023, Riza, Inc.' +copyright = '2024, Riza, Inc.' author = 'Riza, Inc.' # The full version, including alpha/beta/rc tags -release = '1.23.0' +release = '1.30.0' # -- General configuration --------------------------------------------------- @@ -33,7 +33,8 @@ extensions = [ 'myst_parser', 'sphinx_rtd_theme', - "sphinx_favicon", + 'sphinx_favicon', + 'sphinxext.rediraffe', ] # Add any paths that contain templates here, relative to this directory. @@ -75,4 +76,8 @@ def setup(app): myst_enable_extensions = [ "attrs_inline", "colon_fence", -] \ No newline at end of file +] + +rediraffe_redirects = { + "howto/upload.md": "howto/push.md", +} diff --git a/docs/guides/development.md b/docs/guides/development.md index 7f03115837..f8196572be 100644 --- a/docs/guides/development.md +++ b/docs/guides/development.md @@ -8,6 +8,12 @@ For local development, install `sqlc` under an alias. We suggest `sqlc-dev`. go build -o ~/go/bin/sqlc-dev ./cmd/sqlc ``` +Install `sqlc-gen-json` to avoid test failure. + +``` +go build -o ~/go/bin/sqlc-gen-json ./cmd/sqlc-gen-json +``` + ## Running Tests ``` @@ -53,16 +59,3 @@ MYSQL_USER root MYSQL_ROOT_PASSWORD mysecretpassword MYSQL_DATABASE dinotest ``` - -## Regenerate expected test output - -If you need to update a large number of expected test output in the -`internal/endtoend/testdata` directory, run the `regenerate` script. - -``` -go build -o ~/go/bin/sqlc-dev ./cmd/sqlc -go run scripts/regenerate/main.go -``` - -Note that this uses the `sqlc-dev` binary, not `sqlc` so make sure you have an -up to date `sqlc-dev` binary. diff --git a/docs/guides/migrating-off-hosted-managed-databases.md b/docs/guides/migrating-off-hosted-managed-databases.md new file mode 100644 index 0000000000..b49ed69fda --- /dev/null +++ b/docs/guides/migrating-off-hosted-managed-databases.md @@ -0,0 +1,71 @@ +# Migrating off hosted managed databases + +Starting in sqlc 1.27.0, [managed databases](../docs/managed-databases.md) will require a database server URI in the configuration file. + +This guide walks you through migrating to a locally running database server. + +## Run a database server locally + +There are many options for running a database server locally, but this guide +will use [Docker Compose](https://docs.docker.com/compose/), as it can support +both MySQL and PostgreSQL. + +If you're using macOS and PostgreSQL, [Postgres.app](https://postgresapp.com/) is also a good option. + +For MySQL, create a `docker-compose.yml` file with the following contents: + +```yaml +version: "3.8" +services: + mysql: + image: "mysql/mysql-server:8.0" + ports: + - "3306:3306" + restart: always + environment: + MYSQL_DATABASE: dinotest + MYSQL_ROOT_PASSWORD: mysecretpassword + MYSQL_ROOT_HOST: '%' +``` + +For PostgreSQL, create a `docker-compose.yml` file with the following contents: + +```yaml +version: "3.8" +services: + postgresql: + image: "postgres:16" + ports: + - "5432:5432" + restart: always + environment: + POSTGRES_DB: postgres + POSTGRES_PASSWORD: mysecretpassword + POSTGRES_USER: postgres +``` + +```sh +docker compose up -d +``` + +## Upgrade sqlc + +You must be running sqlc v1.30.0 or greater to have access to the `servers` +configuration. + +## Add servers to configuration + +```diff +version: '2' +cloud: + project: '' ++ servers: ++ - name: mysql ++ uri: mysql://localhost:3306 ++ - name: postgres ++ uri: postgres://localhost:5432/postgres?sslmode=disable +``` + +## Re-generate the code + +Run `sqlc generate`. A database with the `sqlc_managed_` prefix will be automatically created and used for query analysis. diff --git a/docs/guides/migrating-to-sqlc-gen-kotlin.md b/docs/guides/migrating-to-sqlc-gen-kotlin.md index 2c39e1c4c4..17660aaad4 100644 --- a/docs/guides/migrating-to-sqlc-gen-kotlin.md +++ b/docs/guides/migrating-to-sqlc-gen-kotlin.md @@ -33,7 +33,7 @@ already. Add the following configuration for the plugin: ```yaml version: "2" plugins: - name: "kt" +- name: "kt" wasm: url: "https://downloads.sqlc.dev/plugin/sqlc-gen-kotlin_1.0.0.wasm" sha256: "7620dc5d462de41fdc90e2011232c842117b416c98fd5c163d27c5738431a45c" diff --git a/docs/guides/plugins.md b/docs/guides/plugins.md index 0a97a2b776..b229f91732 100644 --- a/docs/guides/plugins.md +++ b/docs/guides/plugins.md @@ -72,6 +72,8 @@ For a complete working example see the following files: - A process-based plugin that serializes the CodeGenRequest to JSON - [process_plugin_sqlc_gen_json](https://github.com/sqlc-dev/sqlc/tree/main/internal/endtoend/testdata/process_plugin_sqlc_gen_json) - An example project showing how to use a process-based plugin +- [process_plugin_sqlc_gen_json](https://github.com/sqlc-dev/sqlc/tree/main/internal/endtoend/testdata/process_plugin_format_json/) + - An example project showing how to use a process-based plugin using json ## Environment variables @@ -99,4 +101,4 @@ plugins: ``` A variable named `SQLC_VERSION` is always included in the plugin's -environment, set to the version of the `sqlc` executable invoking it. \ No newline at end of file +environment, set to the version of the `sqlc` executable invoking it. diff --git a/docs/guides/using-go-and-pgx.rst b/docs/guides/using-go-and-pgx.rst index 636434d3af..68e2242926 100644 --- a/docs/guides/using-go-and-pgx.rst +++ b/docs/guides/using-go-and-pgx.rst @@ -109,3 +109,25 @@ pgx types directly. fmt.Println(author.Name) } + +.. note:: + For production applications, consider using pgxpool for connection pooling: + + .. code-block:: go + + import ( + "github.com/jackc/pgx/v5/pgxpool" + "example.com/sqlc-tutorial/db" + ) + + func main() { + pool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL")) + if err != nil { + fmt.Fprintf(os.Stderr, "Unable to create connection pool: %v\n", err) + os.Exit(1) + } + defer pool.Close() + + q := db.New(pool) + // Use q the same way as with single connections + } diff --git a/docs/howto/ci-cd.md b/docs/howto/ci-cd.md index 752ad96e13..302c6353a7 100644 --- a/docs/howto/ci-cd.md +++ b/docs/howto/ci-cd.md @@ -1,7 +1,8 @@ # 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 three subcommands you'll want to run are `diff`, `vet` and `upload` +part of your CI/CD pipeline. The four subcommands you'll want to run are `diff`, +`vet`, `verify` and `push` `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 @@ -26,15 +27,21 @@ 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) +`sqlc verify` ensures that schema changes do not break production. Existing +queries are checked against new schema changes for correctness. Please see the +[verify](verify.md) documentation for a complete guide. + + +`sqlc push` pushes your database schema, queries and configuration to sqlc +Cloud. These archives are used by `verify` to catch breaking changes to your +database schema. Learn more about uploading projects [here](push.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`. Run `sqlc upload` after merge on your `main` branch. +Create three steps in your pipeline for `sqlc diff`, `sqlc vet`, and `sqlc +verify`. Run `sqlc push` after merge on your `main` branch. ## GitHub Actions @@ -57,7 +64,7 @@ jobs: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - sqlc-version: '1.23.0' + sqlc-version: '1.30.0' - run: sqlc diff ``` @@ -73,79 +80,82 @@ on: [push] jobs: vet: runs-on: ubuntu-latest - services: - postgres: - image: "postgres:15" - env: - POSTGRES_DB: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - env: - PG_PORT: ${{ job.services.postgres.ports['5432'] }} - steps: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: - 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 - env: - PGPASSWORD: postgres + sqlc-version: '1.30.0' + # Start a PostgreSQL server + - uses: sqlc-dev/action-setup-postgres@master + with: + postgres-version: "16" + id: postgres - run: sqlc vet + env: + POSTGRESQL_SERVER_URI: ${{ steps.postgres.outputs.connection-uri }}?sslmode=disable + ``` -#### Managed databases +### push ```{note} -Managed databases are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +Pushing a project is 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. +The following GitHub Workflow configuration runs [sqlc push](push.md) on +every push to `main`. Create an auth token via the +[dashboard](https://dashboard.sqlc.dev). ```yaml name: sqlc on: [push] jobs: - vet: + push: 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.23.0' - - run: sqlc vet + sqlc-version: '1.30.0' + - run: sqlc push + env: + SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} ``` -### upload +### verify ```{note} -Project uploads are powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +Verify database migrations is 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 on: [push] jobs: - upload: + verify: 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.23.0' - - run: sqlc upload + sqlc-version: '1.30.0' + - uses: sqlc-dev/action-setup-postgres@master + with: + postgres-version: "16" + id: postgres + - run: sqlc verify env: + POSTGRESQL_SERVER_URI: ${{ steps.postgres.outputs.connection-uri }}?sslmode=disable SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} -``` + push: + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' }} + steps: + - uses: sqlc-dev/setup-sqlc@v3 + with: + sqlc-version: '1.30.0' + - run: sqlc push + env: + SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} +`````` diff --git a/docs/howto/ddl.md b/docs/howto/ddl.md index 4e9d36d855..2d51af7fad 100644 --- a/docs/howto/ddl.md +++ b/docs/howto/ddl.md @@ -69,75 +69,84 @@ type Post struct { } ``` -### goose +### dbmate ```sql --- +goose Up -CREATE TABLE post ( - id int NOT NULL, - title text, - body text, - PRIMARY KEY(id) -); +-- migrate:up +CREATE TABLE foo (bar INT NOT NULL); --- +goose Down -DROP TABLE post; +-- migrate:down +DROP TABLE foo; ``` ```go package db -type Post struct { - ID int - Title sql.NullString - Body sql.NullString +type Foo struct { + Bar int32 } ``` -### sql-migrate +### golang-migrate -```sql --- +migrate Up --- SQL in section 'Up' is executed when this migration is applied -CREATE TABLE people (id int); +**Warning:** +[golang-migrate interprets](https://github.com/golang-migrate/migrate/blob/master/MIGRATIONS.md#migration-filename-format) +migration filenames numerically. However, sqlc parses migration files in +lexicographic order. If you choose to have sqlc enumerate your migration files, +make sure their numeric ordering matches their lexicographic ordering to avoid +unexpected behavior. This can be done by prepending enough zeroes to the +migration filenames. +This doesn't work as intended. --- +migrate Down --- SQL section 'Down' is executed when this migration is rolled back -DROP TABLE people; +``` +1_initial.up.sql +... +9_foo.up.sql +# this migration file will be parsed BEFORE 9_foo +10_bar.up.sql ``` -```go -package db +This worked as intended. -type People struct { - ID int32 -} +``` +001_initial.up.sql +... +009_foo.up.sql +010_bar.up.sql ``` -### tern +In `20060102.up.sql`: ```sql -CREATE TABLE comment (id int NOT NULL, text text NOT NULL); ----- create above / drop below ---- -DROP TABLE comment; +CREATE TABLE post ( + id int NOT NULL, + title text, + body text, + PRIMARY KEY(id) +); +``` + +In `20060102.down.sql`: + +```sql +DROP TABLE post; ``` ```go package db -type Comment struct { - ID int32 - Text string +type Post struct { + ID int + Title sql.NullString + Body sql.NullString } ``` -### golang-migrate +### goose **Warning:** -[golang-migrate interprets](https://github.com/golang-migrate/migrate/blob/master/MIGRATIONS.md#migration-filename-format) -migration filenames numerically. However, sqlc parses migration files in -lexicographic order. If you choose to have sqlc enumerate your migration files, +sqlc parses migration files in lexicographic order. **If you are using numeric filenames for migrations in Goose and you choose to have sqlc enumerate your migration files**, make sure their numeric ordering matches their lexicographic ordering to avoid unexpected behavior. This can be done by prepending enough zeroes to the migration filenames. @@ -145,36 +154,32 @@ migration filenames. This doesn't work as intended. ``` -1_initial.up.sql +1_initial.sql ... -9_foo.up.sql +9_foo.sql # this migration file will be parsed BEFORE 9_foo -10_bar.up.sql +10_bar.sql ``` This worked as intended. ``` -001_initial.up.sql +001_initial.sql ... -009_foo.up.sql -010_bar.up.sql +009_foo.sql +010_bar.sql ``` -In `20060102.up.sql`: - ```sql +-- +goose Up CREATE TABLE post ( id int NOT NULL, title text, body text, PRIMARY KEY(id) ); -``` - -In `20060102.down.sql`: -```sql +-- +goose Down DROP TABLE post; ``` @@ -188,20 +193,40 @@ type Post struct { } ``` -### dbmate +### sql-migrate ```sql --- migrate:up -CREATE TABLE foo (bar INT NOT NULL); +-- +migrate Up +-- SQL in section 'Up' is executed when this migration is applied +CREATE TABLE people (id int); --- migrate:down -DROP TABLE foo; + +-- +migrate Down +-- SQL section 'Down' is executed when this migration is rolled back +DROP TABLE people; ``` ```go package db -type Foo struct { - Bar int32 +type People struct { + ID int32 +} +``` + +### tern + +```sql +CREATE TABLE comment (id int NOT NULL, text text NOT NULL); +---- create above / drop below ---- +DROP TABLE comment; +``` + +```go +package db + +type Comment struct { + ID int32 + Text string } ``` diff --git a/docs/howto/delete.md b/docs/howto/delete.md index 68d22a2e46..95045a37a6 100644 --- a/docs/howto/delete.md +++ b/docs/howto/delete.md @@ -5,11 +5,22 @@ CREATE TABLE authors ( id SERIAL PRIMARY KEY, bio text NOT NULL ); +``` + +The parameter syntax varies by database engine: +**PostgreSQL:** +```sql -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1; ``` +**MySQL and SQLite:** +```sql +-- name: DeleteAuthor :exec +DELETE FROM authors WHERE id = ?; +``` + ```go package db diff --git a/docs/howto/embedding.md b/docs/howto/embedding.md index 125386135b..5ea8cbbc0a 100644 --- a/docs/howto/embedding.md +++ b/docs/howto/embedding.md @@ -26,7 +26,7 @@ Here's how we'd usually do that: SELECT students.*, test_scores.* FROM students JOIN test_scores ON test_scores.student_id = students.id -WHERE students.id = ?; +WHERE students.id = $1; ``` When using Go, sqlc will produce a struct like this: @@ -50,7 +50,7 @@ flattened list of columns. SELECT sqlc.embed(students), sqlc.embed(test_scores) FROM students JOIN test_scores ON test_scores.student_id = students.id -WHERE students.id = ?; +WHERE students.id = $1; ``` ``` diff --git a/docs/howto/generate.md b/docs/howto/generate.md index 447343ac98..288fb1a7d4 100644 --- a/docs/howto/generate.md +++ b/docs/howto/generate.md @@ -27,10 +27,6 @@ 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 @@ -38,8 +34,9 @@ an up-to-date schema. Here's a minimal working configuration: ```yaml version: "2" -cloud: - project: "" +servers: +- engine: postgresql + uri: "postgres://locahost:5432/postgres?sslmode=disable" sql: - engine: "postgresql" queries: "query.sql" diff --git a/docs/howto/insert.md b/docs/howto/insert.md index ae892998ec..7bb02d6745 100644 --- a/docs/howto/insert.md +++ b/docs/howto/insert.md @@ -5,11 +5,22 @@ CREATE TABLE authors ( id SERIAL PRIMARY KEY, bio text NOT NULL ); +``` + +The parameter syntax varies by database engine: +**PostgreSQL:** +```sql -- name: CreateAuthor :exec INSERT INTO authors (bio) VALUES ($1); ``` +**MySQL and SQLite:** +```sql +-- name: CreateAuthor :exec +INSERT INTO authors (bio) VALUES (?); +``` + ```go package db @@ -51,7 +62,10 @@ CREATE TABLE authors ( name text NOT NULL, bio text ); +``` +**PostgreSQL:** +```sql -- name: CreateAuthor :one INSERT INTO authors ( name, bio @@ -69,6 +83,27 @@ INSERT INTO authors ( RETURNING id; ``` +**SQLite (with RETURNING support):** +```sql +-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio +) VALUES ( + ?, ? +) +RETURNING *; + +-- name: CreateAuthorAndReturnId :one +INSERT INTO authors ( + name, bio +) VALUES ( + ?, ? +) +RETURNING id; +``` + +Note: MySQL does not support the `RETURNING` clause. Use `:execresult` instead to get the last insert ID. + ```go package db diff --git a/docs/howto/managed-databases.md b/docs/howto/managed-databases.md index 5297bd925c..745524ea5f 100644 --- a/docs/howto/managed-databases.md +++ b/docs/howto/managed-databases.md @@ -1,37 +1,31 @@ # 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 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. +`sqlc` can automatically create read-only databases to power query analysis, +linting and verification. These 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 +with [`sqlc vet`](vet.md) 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. +supporting other use-cases. ## Configuring managed databases 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). +Access to a running database server is required. Add a connection string to the `servers` mapping. ```yaml version: '2' -cloud: - project: '' +servers: +- engine: postgresql + uri: "postgres://localhost:5432/postgres?sslmode=disable" sql: - schema: schema.sql queries: query.sql @@ -40,13 +34,19 @@ sql: managed: true ``` -### Authentication +An environment variable can also be used via the `${}` syntax. -`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). - -```shell -export SQLC_AUTH_TOKEN=sqlc_xxxxxxxx +```yaml +version: '2' +servers: +- engine: postgresql + uri: ${DATABASE_URI} +sql: +- schema: schema.sql + queries: query.sql + engine: postgresql + database: + managed: true ``` ## Improving codegen @@ -61,8 +61,9 @@ on a per-query basis to speed up future codegen runs. Here's a minimal working c ```yaml version: '2' -cloud: - project: '' +servers: +- engine: postgresql + uri: "postgres://localhost:5432/postgres?sslmode=disable" sql: - schema: schema.sql queries: query.sql @@ -78,16 +79,17 @@ sql: 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). +database connection, e.g. any [rule relying on `EXPLAIN ...` output](vet.md#rules-using-explain-output). -If you don't yet have any vet rules, the [built-in sqlc/db-prepare rule](vet.html#sqlc-db-prepare) +If you don't yet have any vet rules, the [built-in sqlc/db-prepare rule](vet.md#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: ```yaml version: '2' -cloud: - project: '' +servers: +- engine: postgresql + uri: "postgres://localhost:5432/postgres?sslmode=disable" sql: - schema: schema.sql queries: query.sql @@ -97,35 +99,3 @@ 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/named_parameters.md b/docs/howto/named_parameters.md index c4643bd8e3..0837c70c15 100644 --- a/docs/howto/named_parameters.md +++ b/docs/howto/named_parameters.md @@ -1,6 +1,6 @@ # Naming parameters -sqlc tried to generate good names for positional parameters, but sometimes it +sqlc tries to generate good names for positional parameters, but sometimes it lacks enough context. The following SQL generates parameters with less than ideal names: @@ -46,6 +46,10 @@ type UpdateAuthorNameParams struct { If the `sqlc.arg()` syntax is too verbose for your taste, you can use the `@` operator as a shortcut. +```{note} +The `@` operator as a shortcut for `sqlc.arg()` is not supported in MySQL. +``` + ```sql -- name: UpsertAuthorName :one UPDATE author diff --git a/docs/howto/overrides.md b/docs/howto/overrides.md index baa9163c4d..8cdcbde6a2 100644 --- a/docs/howto/overrides.md +++ b/docs/howto/overrides.md @@ -1,12 +1,22 @@ # Overriding types -The default mapping of PostgreSQL/MySQL types to Go types only uses packages outside -the standard library when it must. +:::{note} +Type overrides and field renaming are only fully-supported for Go. +::: -For example, the `uuid` PostgreSQL type is mapped to `github.com/google/uuid`. -If a different Go package for UUIDs is required, specify the package in the -`overrides` array. In this case, I'm going to use the `github.com/gofrs/uuid` -instead. +In many cases it's useful to tell `sqlc` explicitly what Go type you want it to +use for a query input or output. For instance, by default when you use +`pgx/v5`, `sqlc` will map a PostgreSQL UUID type to `UUID` from `github.com/jackc/pgx/pgtype`. +But you may want `sqlc` to use `UUID` from `github.com/google/uuid` instead. + +To tell `sqlc` to use a different Go type, add an entry to the `overrides` list in your +configuration. + +`sqlc` offers two kinds of Go type overrides: +* `db_type` overrides, which override the Go type for a specific database type. +* `column` overrides, which override the Go type for a column or columns by name. + +Here's an example including one of each kind: ```yaml version: "2" @@ -17,34 +27,61 @@ sql: gen: go: package: "authors" - out: "postgresql" + out: "db" + sql_package: "pgx/v5" overrides: - db_type: "uuid" - go_type: "github.com/gofrs/uuid.UUID" + nullable: true + go_type: + import: "github.com/google/uuid" + type: "UUID" + - column: "users.birthday" + go_type: "time.Time" ``` -Each mapping of the `overrides` collection has the following keys: +:::{tip} + A single `db_type` override configuration applies to either nullable or non-nullable + columns, but not both. If you want the same Go type to override regardless of + nullability, you'll need to configure two overrides: one with `nullable: true` and one without. +::: + +## The `overrides` list + +Each element in the `overrides` list 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. + - A database 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 pg_catalog-prefixed names where available. `db_type` and `column` are mutually exclusive. - `column`: - - In case the type overriding should be done on specific a column of a table instead of a type. `column` should be of the form `table.column` but you can be even more specific by specifying `schema.table.column` or `catalog.schema.table.column`. Can't be used if the `db_type` key is defined. + - A column name to override. The value should be of the form `table.column` but you can also specify `schema.table.column` or `catalog.schema.table.column`. `column` and `db_type` are mutually exclusive. - `go_type`: - - A fully qualified name to a Go type to use in the generated code. + - The fully-qualified name of a Go type to use in generated code. This is usually a string but can also be [a map](#the-go-type-map) for more complex configurations. - `go_struct_tag`: - - A reflect-style struct tag to use in the generated code, e.g. `a:"b" x:"y,z"`. - If you want general json/db tags for all fields, use `emit_db_tags` and/or `emit_json_tags` instead. + - A reflect-style struct tag to use in generated code, e.g. `a:"b" x:"y,z"`. + If you want `json` or `db` tags for all fields, configure `emit_json_tags` or `emit_db_tags` instead. +- `unsigned`: + - If `true`, sqlc will apply this override when a numeric column is unsigned. + Note that this only applies to `db_type` overrides and has no effect on `column` overrides. + Defaults to `false`. - `nullable`: - - If `true`, use this type when a column is nullable. Defaults to `false`. + - If `true`, sqlc will apply this override when a column is nullable. + Otherwise `sqlc` will apply this override when a column is non-nullable. + Note that this only applies to `db_type` overrides and has no effect on `column` overrides. + Defaults to `false`. + +:::{tip} + A single `db_type` override configuration applies to either nullable or non-nullable + columns, but not both. If you want the same Go type to override regardless of nullability, you'll + need to configure two overrides: one with `nullable: true` and one without. +::: -Note that a single `db_type` override configuration applies to either nullable or non-nullable -columns, but not both. If you want a single `go_type` to override in both cases, you'll -need to specify two overrides. +:::{note} +When generating code, `column` override configurations take precedence over `db_type` configurations. +::: -When generating code, entries using the `column` key will always have preference over -entries using the `db_type` key in order to generate the struct. +### The `go_type` map -For more complicated import paths, the `go_type` can also be an object with the following keys: +Some overrides may require more detailed configuration. If necessary, `go_type` +can be a map with the following keys: - `import`: - The import path for the package where the type is defined. @@ -53,9 +90,9 @@ For more complicated import paths, the `go_type` can also be an object with the - `type`: - The type name itself, without any package prefix. - `pointer`: - - If set to `true`, generated code will use pointers to the type rather than the type itself. + - If `true`, generated code will use a pointer to the type rather than the type itself. - `slice`: - - If set to `true`, generated code will use a slice of the type rather than the type itself. + - If `true`, generated code will use a slice of the type rather than the type itself. An example: @@ -66,9 +103,10 @@ sql: queries: "postgresql/query.sql" engine: "postgresql" gen: - go: + go: package: "authors" - out: "postgresql" + out: "db" + sql_package: "pgx/v5" overrides: - db_type: "uuid" go_type: @@ -76,4 +114,75 @@ sql: package: "b" type: "MyType" pointer: true -``` \ No newline at end of file +``` + +## Global overrides + +To override types in all packages that `sqlc` generates, add an override +configuration to the top-level `overrides` section of your `sqlc` config: + +```yaml +version: "2" +overrides: + go: + overrides: + - db_type: "pg_catalog.timestamptz" + nullable: true + engine: "postgresql" + go_type: + import: "gopkg.in/guregu/null.v4" + package: "null" + type: "Time" +sql: +- schema: "service1/schema.sql" + queries: "service1/query.sql" + engine: "postgresql" + gen: + go: + package: "service1" + out: "service1" +- schema: "service2/schema.sql" + queries: "service2/query.sql" + engine: "postgresql" + gen: + go: + package: "service2" + out: "service2" +``` + +Using this configuration, whenever there is a nullable `timestamp with time zone` +column in a Postgres table, `sqlc` will generate Go code using `null.Time`. + +Note that the mapping for global type overrides has a field called `engine` that +is absent in per-package type overrides. This field is only used when there are +multiple `sql` sections using different engines. If you're only generating code +for a single database engine you can omit it. + +#### Version 1 configuration + +If you are using the older version 1 of the `sqlc` configuration format, override +configurations themselves are unchanged but are nested differently. + +Per-package configurations are nested under the `overrides` key within an item +in the `packages` list: + +```yaml +version: "1" +packages: + - name: "db" + path: "internal/db" + queries: "./sql/query/" + schema: "./sql/schema/" + engine: "postgresql" + overrides: [...] +``` + +And global configurations are nested under the top-level `overrides` key: + +```yaml +version: "1" +packages: [...] +overrides: + - db_type: "uuid" + go_type: "github.com/gofrs/uuid.UUID" +``` diff --git a/docs/howto/push.md b/docs/howto/push.md new file mode 100644 index 0000000000..337e127513 --- /dev/null +++ b/docs/howto/push.md @@ -0,0 +1,71 @@ +# `push` - Uploading projects + +```{note} +`push` is powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. +``` + +*Added in v1.24.0* + +We've renamed the `upload` sub-command to `push`. We've also changed the data sent along in a push request. Upload used to include the configuration file, migrations, queries, and all generated code. Push drops the generated code in favor of including the [plugin.GenerateRequest](https://buf.build/sqlc/sqlc/docs/main:plugin#plugin.GenerateRequest), which is the protocol buffer message we pass to codegen plugins. + +## Add configuration + +After creating a project, add the project ID to your sqlc configuration file. + +```yaml +version: "2" +cloud: + project: "" +``` + +You'll also need to create an auth token and make it available via the +`SQLC_AUTH_TOKEN` environment variable. + +```shell +export SQLC_AUTH_TOKEN=sqlc_xxxxxxxx +``` + +## Dry run + +You can see what's included when uploading your project by using using the +`--dry-run` flag: + +```shell +$ sqlc push --dry-run +2023/11/21 10:39:51 INFO config file=sqlc.yaml bytes=912 +2023/11/21 10:39:51 INFO codegen_request queryset=app file=codegen_request.pb +2023/11/21 10:39:51 INFO schema queryset=app file=migrations/00001_initial.sql bytes=3033 +2023/11/21 10:39:51 INFO query queryset=app file=queries/app.sql bytes=1150 +``` + +The output is the files `sqlc` would have sent without the `--dry-run` flag. + +## Push + +Once you're ready to push, remove the `--dry-run` flag. + +```shell +$ sqlc push +``` + +### Tags + +You can provide tags to associate with a push, primarily as a convenient reference when using `sqlc verify` with the `against` argument. + +Tags only refer to a single push, so if you pass an existing tag to `push` it will overwrite the previous reference. + +```shell +$ sqlc push --tag main +``` + +### Annotations + +Annotations are added to each push request. By default, we include these environment variables (if they are present). + +``` +GITHUB_REPOSITORY +GITHUB_REF +GITHUB_REF_NAME +GITHUB_REF_TYPE +GITHUB_SHA +``` diff --git a/docs/howto/rename.md b/docs/howto/rename.md index 0085de4e05..47ee05cf7e 100644 --- a/docs/howto/rename.md +++ b/docs/howto/rename.md @@ -30,7 +30,10 @@ sql: ## Tables -The output structs associated with tables can also be renamed. By default, the struct name will be the singular version of the table name. For example, the `authors` table will generate an `Author` struct. +The output structs associated with tables can also be renamed. By default, +the struct name will be the singular version of the table name. For example, +the `authors` table will generate an `Author` struct and the `book_publishers` +table will generate a `BookPublisher` struct. ```sql CREATE TABLE authors ( @@ -38,6 +41,11 @@ CREATE TABLE authors ( name text NOT NULL, bio text ); + +CREATE TABLE book_publishers ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL +); ``` ```go @@ -52,9 +60,17 @@ type Author struct { Name string Bio sql.NullString } + +type Publisher struct { + ID int64 + Name string +} ``` -To rename this struct, you must use the generated struct name. In this example, that would be `author`. Use the `rename` map to change the name of this struct to `Writer` (note the uppercase `W`). +To rename these structs, you must use the generated struct name. In this +example, that would be `author` and `book_publisher`. Use the `rename` map to +change the name of these struct to `Writer` and `BookPublisher` (note the +camel-casing and the underscore for multi-worded tables). ```yaml version: '1' @@ -65,6 +81,20 @@ packages: queries: query.sql rename: author: Writer + book_publisher: Publisher +``` + +```yaml +version: "2" +sql: + - engine: postgresql + queries: query.sql + schema: query.sql +overrides: + go: + rename: + author: Writer + book_publisher: Publisher ``` ```go @@ -79,9 +109,14 @@ type Writer struct { Name string Bio sql.NullString } + +type Publisher struct { + ID int64 + Name string +} ``` ## Limitations Rename mappings apply to an entire package. Therefore, a column named `foo` and -a table name `foo` can't map to different rename values. \ No newline at end of file +a table name `foo` can't map to different rename values. diff --git a/docs/howto/select.md b/docs/howto/select.md index cea3900b68..9a53a1d9ef 100644 --- a/docs/howto/select.md +++ b/docs/howto/select.md @@ -8,8 +8,12 @@ CREATE TABLE authors ( bio text NOT NULL, birth_year int NOT NULL ); +``` +The parameter syntax varies by database engine: +**PostgreSQL:** +```sql -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1; @@ -19,6 +23,17 @@ SELECT * FROM authors ORDER BY id; ``` +**MySQL and SQLite:** +```sql +-- name: GetAuthor :one +SELECT * FROM authors +WHERE id = ?; + +-- name: ListAuthors :many +SELECT * FROM authors +ORDER BY id; +``` + A few new pieces of code are generated beyond the `Author` struct. An interface for the underlying database is generated. The `*sql.DB` and `*sql.Tx` types satisfy this interface. @@ -125,7 +140,7 @@ SELECT bio, birth_year FROM authors WHERE id = $1; ``` -When selecting a single column, only that value that returned. The `GetBioForAuthor` +When selecting a single column, only that value is returned. The `GetBioForAuthor` method takes a single `int` as an argument and returns a `string` and an `error`. diff --git a/docs/howto/transactions.md b/docs/howto/transactions.md index bc93ebd661..9ed61b6a4d 100644 --- a/docs/howto/transactions.md +++ b/docs/howto/transactions.md @@ -57,6 +57,7 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries { You'd use it like this: ```go +// Using `github/lib/pq` as the driver. func bumpCounter(ctx context.Context, db *sql.DB, queries *tutorial.Queries, id int32) error { tx, err := db.Begin() if err != nil { @@ -76,4 +77,25 @@ func bumpCounter(ctx context.Context, db *sql.DB, queries *tutorial.Queries, id } return tx.Commit() } + +// Using `github.com/jackc/pgx/v5` as the driver. +func bumpCounter(ctx context.Context, db *pgx.Conn, queries *tutorial.Queries, id int32) error { + tx, err := db.Begin(ctx) + if err != nil { + return err + } + defer tx.Rollback(ctx) + qtx := queries.WithTx(tx) + r, err := qtx.GetRecord(ctx, id) + if err != nil { + return err + } + if err := qtx.UpdateRecord(ctx, tutorial.UpdateRecordParams{ + ID: r.ID, + Counter: r.Counter + 1, + }); err != nil { + return err + } + return tx.Commit(ctx) +} ``` \ No newline at end of file diff --git a/docs/howto/update.md b/docs/howto/update.md index 3abb99ba23..f96306d0f2 100644 --- a/docs/howto/update.md +++ b/docs/howto/update.md @@ -12,11 +12,20 @@ CREATE TABLE authors ( If your query has a single parameter, your Go method will also have a single parameter. +The parameter syntax varies by database engine: + +**PostgreSQL:** ```sql -- name: UpdateAuthorBios :exec UPDATE authors SET bio = $1; ``` +**MySQL and SQLite:** +```sql +-- name: UpdateAuthorBios :exec +UPDATE authors SET bio = ?; +``` + ```go package db @@ -52,12 +61,22 @@ func (q *Queries) UpdateAuthorBios(ctx context.Context, bio string) error { If your query has more than one parameter, your Go method will accept a `Params` struct. +**PostgreSQL:** ```sql -- name: UpdateAuthor :exec UPDATE authors SET bio = $2 WHERE id = $1; ``` +**MySQL and SQLite:** +```sql +-- name: UpdateAuthor :exec +UPDATE authors SET bio = ? +WHERE id = ?; +``` + +Note: For MySQL and SQLite, parameters are bound in the order they appear in the query, regardless of the order in the function signature. + ```go package db diff --git a/docs/howto/upload.md b/docs/howto/upload.md deleted file mode 100644 index 0cf5d4a47c..0000000000 --- a/docs/howto/upload.md +++ /dev/null @@ -1,50 +0,0 @@ -# `upload` - 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 -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. - -## Add configuration - -After creating a project, add the project ID to your sqlc configuration file. - -```yaml -version: "2" -cloud: - project: "" -``` - -You'll also need to create an auth token and make it available via the -`SQLC_AUTH_TOKEN` environment variable. - -```shell -export SQLC_AUTH_TOKEN=sqlc_xxxxxxxx -``` - -## Dry run - -You can see what's included when uploading your project by using using the -`--dry-run` flag: - -```shell -sqlc upload --dry-run -``` - -The output is the request `sqlc` would have sent without the `--dry-run` flag. - -## Upload - -Once you're ready to upload, remove the `--dry-run` flag. - -```shell -sqlc upload -``` - -By uploading your project, you're making sqlc more stable and reliable. Thanks! diff --git a/docs/howto/verify.md b/docs/howto/verify.md new file mode 100644 index 0000000000..62da44013d --- /dev/null +++ b/docs/howto/verify.md @@ -0,0 +1,105 @@ +# `verify` - Verifying schema changes + +*Added in v1.24.0* + +Schema updates and poorly-written queries often bring down production databases. That’s bad. + +Out of the box, `sqlc generate` catches some of these issues. Running `sqlc vet` with the `sqlc/db-prepare` rule catches more subtle problems. But there is a large class of issues that sqlc can’t prevent by looking at current schema and queries alone. + +For instance, when a schema change is proposed, existing queries and code running in production might fail when the schema change is applied. Enter `sqlc verify`, which analyzes existing queries against new schema changes and errors if there are any issues. + +Let's look at an example. Assume you have these two tables in production. + +```sql +CREATE TABLE users ( + id UUID PRIMARY KEY +); + +CREATE TABLE user_actions ( + id UUID PRIMARY KEY, + user_id UUID NOT NULL, + action TEXT, + created_at TIMESTAMP +); +``` + +Your application contains the following query to join user actions against the users table. + +```sql +-- name: GetUserActions :many +SELECT * FROM users u +JOIN user_actions ua ON u.id = ua.user_id +ORDER BY created_at; +``` + +So far, so good. Then assume you propose this schema change: + +```sql +ALTER TABLE users ADD COLUMN created_at TIMESTAMP; +``` + +Running `sqlc generate` fails with this change, returning a `column reference "created_at" is ambiguous` error. You update your query to fix the issue. + +```sql +-- name: GetUserActions :many +SELECT * FROM users u +JOIN user_actions ua ON u.id = ua.user_id +ORDER BY u.created_at; +``` + +While that change fixes the issue, there's a production outage waiting to happen. When the schema change is applied, the existing `GetUserActions` query will begin to fail. The correct way to fix this is to deploy the updated query before applying the schema migration. + +It ensures migrations are safe to deploy by sending your current schema and queries to sqlc cloud. There, we run the queries for your latest push against your new schema changes. This check catches backwards incompatible schema changes for existing queries. + +Here `sqlc verify` alerts you to the fact that ORDER BY "created_at" is ambiguous. + +```sh +$ sqlc verify +FAIL: app query.sql + +=== Failed +=== FAIL: app query.sql GetUserActions + ERROR: column reference "created_at" is ambiguous (SQLSTATE 42702) +``` + +By the way, this scenario isn't made up! It happened to us a few weeks ago. We've been happily testing early versions of `verify` for the last two weeks and haven't had any issues since. + +This type of verification is only the start. If your application is deployed on-prem by your customers, `verify` could tell you if it's safe for your customers to rollback to an older version of your app, even after schema migrations have been run. + +Using `verify` requires that you push your queries and schema when you tag a release of your application. We run it on every push to main, as we continuously deploy those commits. + +## 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). + +```shell +export SQLC_AUTH_TOKEN=sqlc_xxxxxxxx +``` + +## Expected workflow + +Using `sqlc verify` requires pushing your queries and schema to sqlc Cloud. When +you release a new version of your application, you should push your schema and +queries as well. For example, we run `sqlc push` after any change has been +merged into our `main` branch on Github, as we deploy every commit to +production. + +```shell +$ sqlc push --tag main +``` + +Locally or in pull requests, run `sqlc verify` to check that existing queries +continue to work with your current database schema. + +```shell +$ sqlc verify --against main +``` + +## Picking a tag + +Without an `against` argument, `verify` will run its analysis of the provided schema using your most-recently pushed queries. We suggest using the `against` argument to explicitly select a set of queries for comparison. + +```shell +$ sqlc verify --against [tag] +``` diff --git a/docs/howto/vet.md b/docs/howto/vet.md index ff6ff3ceb0..3f6c6a025b 100644 --- a/docs/howto/vet.md +++ b/docs/howto/vet.md @@ -259,7 +259,24 @@ rules: ### Opting-out of lint rules For any query, you can tell `sqlc vet` not to evaluate lint rules using the -`@sqlc-vet-disable` query annotation. +`@sqlc-vet-disable` query annotation. The annotation accepts a list of rules to ignore. + +```sql +/* name: GetAuthor :one */ +/* @sqlc-vet-disable sqlc/db-prepare no-pg */ +SELECT * FROM authors +WHERE id = ? LIMIT 1; +``` +The rules can also be split across lines. +```sql +/* name: GetAuthor :one */ +/* @sqlc-vet-disable sqlc/db-prepare */ +/* @sqlc-vet-disable no-pg */ +SELECT * FROM authors +WHERE id = ? LIMIT 1; +``` + +To skip all rules for a query, you can provide the `@sqlc-vet-disable` annotation without any parameters. ```sql /* name: GetAuthor :one */ diff --git a/docs/index.rst b/docs/index.rst index 3bd9e87567..f914f3ec41 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,8 +42,9 @@ code ever again. :hidden: howto/generate.md + howto/push.md + howto/verify.md howto/vet.md - howto/upload.md .. toctree:: :maxdepth: 2 diff --git a/docs/overview/install.md b/docs/overview/install.md index 490d107b2b..354c65d249 100644 --- a/docs/overview/install.md +++ b/docs/overview/install.md @@ -14,20 +14,14 @@ brew install sqlc sudo snap install sqlc ``` -## go install +## go install -### Go >= 1.17: +Installing recent versions of sqlc requires Go 1.21+. ``` go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest ``` -### Go < 1.17: - -``` -go get github.com/sqlc-dev/sqlc/cmd/sqlc -``` - ## Docker ``` @@ -48,10 +42,10 @@ docker run --rm -v "%cd%:/src" -w /src sqlc/sqlc generate ## Downloads -Get pre-built binaries for *v1.23.0*: +Get pre-built binaries for *v1.30.0*: -- [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) +- [Linux](https://downloads.sqlc.dev/sqlc_1.30.0_linux_amd64.tar.gz) +- [macOS](https://downloads.sqlc.dev/sqlc_1.30.0_darwin_amd64.zip) +- [Windows](https://downloads.sqlc.dev/sqlc_1.30.0_windows_amd64.zip) See [downloads.sqlc.dev](https://downloads.sqlc.dev/) for older versions. diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index d573f16997..cb8f1b8d63 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -1,6 +1,542 @@ # Changelog All notable changes to this project will be documented in this file. +(v1-30-0)= +## [1.30.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.30.0) +Released 2025-09-01 + +### Bug Fixes + +- (compiler/mysql) Prevent panic in convertSetOprSelectList() (#4042) +- Range subselect alias pointer dereference (#3711) +- (codegen/golang) Don't omit enums used as arrays (#4058) +- (codegen/golang) Handle `go_struct_tag` for `db_type` overrides (#4055) +- (engine/dolphin) Remove references to deprecated `pcast.ChangeStmt` (#4057) +- Normalize identifier usage for table names (#4045) +- (engine/sqlite) Fix parsing of INSERT DEFAULT VALUES syntax (#4010) + +### Documentation + +- Fix parameter syntax inconsistency for MySQL and SQLite (#4036) +- Use correct configuration to generate the given output for JSON type override (#4049) +- Clean up and add to docs regarding type overrides (#4060) +- Try a different admonition format (#4061) +- Use the correct admonition format (#4062) +- Add multi-worded table example for renaming (#4067) + +### Features + +- (docs) Add link to Gleam/parrot (#4038) +- (engine/dolphin) Implement MATCH_AGAINST conversion in SQL AST (#1192, #3091) (#4070) +- (engine/sqlite) Coerce jsonb columns to json before returning to Go code (#3968) + +### Testing + +- (endtoend) Skip process_plugin_sqlc_gen_json (#4075) +- (endtoend) Use Docker to start database servers (#4076) + +### Build + +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3941) +- (deps) Bump packaging (#3940) +- (deps) Bump golang from 1.24.2 to 1.24.4 (#3983) +- (deps) Bump golang from 1.24.4 to 1.24.5 (#4014) +- (deps) Bump urllib3 from 2.4.0 to 2.5.0 in /docs (#3994) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3989) +- (deps) Bump the production-dependencies group across 1 directory with 4 updates (#4027) +- (deps) Bump modernc.org/sqlite (#4032) +- (deps) Bump the production-dependencies group across 1 directory with 4 updates (#4018) +- (deps) Bump certifi in /docs in the production-dependencies group (#4041) +- (deps) Bump google.golang.org/protobuf (#4043) +- (deps) Bump actions/checkout from 4 to 5 (#4059) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#4071) +- (deps) Bump requests in /docs in the production-dependencies group (#4068) +- Upgrade to Go 1.25 (#4074) +- (deps) Bump golang from 1.24.5 to 1.25.0 (#4063) +- (deps) Bump github.com/google/cel-go (#4080) + +(v1-29-0)= +## [1.29.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.29.0) +Released 2025-04-14 + +### Bug Fixes + +- (docs) Correct spelling and grammar (#3645) +- (dbmanager) Use correct SQL to drop databases (#3640) +- (compiler) Don't crash on WHERE x IN (... UNION ...) (#3652) +- (golang) Escape q field name (#3647) +- Postgresql alter materialized view is not registered to statements (#3728) +- Do not close wazero module on error (#3758) (#3759) +- (pgx) Do not wrap nil error (#3913) +- (migrations) Normalize case for migration statement for all cases (#3919) + +### Documentation + +- Add missing documentation about copyfrom (#3583) +- Add sqlc-gen-from-template (#3601) +- Add changelog for 1.28.0 (#3797) +- Add PHP DBAL plugin (#3813) +- Fix PostGIS function name (#3829) +- Add Zig plugin (#3824) +- Add link to tandemdude/sqlc-gen-java (#3819) + +### Features + +- (docs) How-to use transactions with pgx (#3557) +- (quickdb) Remove unused func (#3576) +- (vet) Allow selective disabling of rules per query (#3620) +- (dolphin) Upgrade to latest TiDB parser (#3733) +- (mysql) Add a test for VECTOR column type (#3734) +- (cli) Bump version from 1.27.0 to 1.28.0 (#3798) +- (codegen/golang) Add an option to wrap query errors that includes query name (#3876) + +### Miscellaneous Tasks + +- Remove the triage label (#3527) +- Upgrade to Go 1.22.8 to silence vulncheck (#3646) +- Update sqlc-gen-java supported engines (#3843) + +### Build + +- (deps) Bump myst-parser (#3530) +- (deps) Bump golang from 1.22.5 to 1.22.6 (#3532) +- (deps) Bump modernc.org/sqlite (#3537) +- (deps) Bump the production-dependencies group across 1 directory with 4 updates (#3566) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3565) +- (deps) Bump golang from 1.22.6 to 1.23.0 (#3546) +- (deps) Bump golang from 1.23.0 to 1.23.1 (#3586) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3644) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3642) +- (deps) Bump sphinx-rtd-theme (#3648) +- (deps) Bump pyparsing (#3653) +- (deps) Bump markupsafe (#3666) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3707) +- (deps) Bump golang from 1.23.2 to 1.23.3 (#3691) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3721) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3731) +- (deps) Bump certifi in /docs in the production-dependencies group (#3748) +- (deps) Bump golang.org/x/crypto from 0.27.0 to 0.31.0 (#3740) +- (deps) Bump golang from 1.23.3 to 1.23.4 (#3735) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3749) +- (deps) Bump the production-dependencies group with 2 updates (#3753) +- (deps) Bump the production-dependencies group across 1 directory with 3 updates (#3764) +- (deps) Bump the production-dependencies group (#3761) +- (deps) Bump jinja2 from 3.1.4 to 3.1.5 in /docs (#3762) +- (deps) Bump google.golang.org/protobuf (#3776) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3777) +- (deps) Bump google.golang.org/grpc (#3784) +- (deps) Bump golang from 1.23.4 to 1.23.5 (#3791) +- (deps) Bump the production-dependencies group with 2 updates (#3789) +- Upgrade to Go 1.23.5 (#3795) +- (deps) Bump golang.org/x/net from 0.30.0 to 0.33.0 (#3796) +- (deps) Bump golang from 1.23.5 to 1.23.6 (#3822) +- Use govulncheck action (#3831) +- (deps) Bump the production-dependencies group across 1 directory with 3 updates (#3817) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3826) +- (deps) Bump golang from 1.23.6 to 1.24.0 (#3842) +- (deps) Bump myst-parser (#3841) +- (deps) Bump modernc.org/sqlite (#3846) +- (deps) Bump golang from 1.24.0 to 1.24.1 (#3870) +- (deps) Bump jinja2 in /docs in the production-dependencies group (#3872) +- Upgrade to wazero@v1.9.0 (#3887) +- Upgrade to Go 1.24.1 (#3892) +- Upgrade to latest version of MySQL parser (#3893) +- (deps) Bump pyparsing (#3890) +- (deps) Bump golang.org/x/net from 0.33.0 to 0.37.0 (#3894) +- (deps) Bump the production-dependencies group across 1 directory with 8 updates (#3896) +- (deps) Bump github.com/jackc/pgx/v5 (#3898) +- (deps) Bump the production-dependencies group (#3899) +- (deps) Bump modernc.org/sqlite (#3905) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3914) +- (deps) Bump urllib3 in /docs in the production-dependencies group (#3926) +- (deps) Bump golang from 1.24.1 to 1.24.2 (#3915) +- (deps) Bump the production-dependencies group across 1 directory with 3 updates (#3923) +- (deps) Upgrade github.com/wasilibs/go-pgquery (#3927) + +(v1-28-0)= +## [1.28.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.28.0) +Released 2025-01-20 + +### Features + +- (mysql) Add a test for VECTOR column type (#3734) +- (quickdb) Remove unused func (#3576) +- (vet) Allow selective disabling of rules per query (#3620) +- (dolphin) Upgrade to latest TiDB parser (#3733) + +### Bug Fixes + +- (dbmanager) Use correct SQL to drop databases (#3640) +- (compiler) Don't crash on WHERE x IN (... UNION ...) (#3652) +- (golang) Escape q field name (#3647) +- Postgresql alter materialized view is not registered to statements (#3728) +- Do not close wazero module on error (#3758) (#3759) + +### Documentation + +- How-to use transactions with pgx (#3557) +- Add missing documentation about copyfrom (#3583) +- Add sqlc-gen-from-template (#3601) +- Correct spelling and grammar (#3645) + +### Miscellaneous Tasks + +- Remove the triage label (#3527) +- Upgrade to Go 1.22.8 to silence vulncheck (#3646) + +### Build + +- (deps) Bump myst-parser (#3530) +- (deps) Bump golang from 1.22.5 to 1.22.6 (#3532) +- (deps) Bump modernc.org/sqlite (#3537) +- (deps) Bump the production-dependencies group across 1 directory with 4 updates (#3566) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3565) +- (deps) Bump golang from 1.22.6 to 1.23.0 (#3546) +- (deps) Bump golang from 1.23.0 to 1.23.1 (#3586) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3644) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3642) +- (deps) Bump sphinx-rtd-theme (#3648) +- (deps) Bump pyparsing (#3653) +- (deps) Bump markupsafe (#3666) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3707) +- (deps) Bump golang from 1.23.2 to 1.23.3 (#3691) +- (deps) Bump the production-dependencies group across 1 directory with 5 updates (#3721) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3731) +- (deps) Bump certifi in /docs in the production-dependencies group (#3748) +- (deps) Bump golang.org/x/crypto from 0.27.0 to 0.31.0 (#3740) +- (deps) Bump golang from 1.23.3 to 1.23.4 (#3735) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3749) +- (deps) Bump the production-dependencies group with 2 updates (#3753) +- (deps) Bump the production-dependencies group across 1 directory with 3 updates (#3764) +- (deps) Bump the production-dependencies group (#3761) +- (deps) Bump jinja2 from 3.1.4 to 3.1.5 in /docs (#3762) +- (deps) Bump google.golang.org/protobuf (#3776) +- (deps) Bump the production-dependencies group across 1 directory with 2 updates (#3777) +- (deps) Bump google.golang.org/grpc (#3784) +- (deps) Bump golang from 1.23.4 to 1.23.5 (#3791) +- (deps) Bump the production-dependencies group with 2 updates (#3789) +- Upgrade to Go 1.23.5 (#3795) + +(v1-27-0)= +## [1.27.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.27.0) +Released 2024-08-05 + +### Bug Fixes + +- (dbmanager) Add leading slash to db uri path rewrite (#3493) +- (verify) Include database engine in request (#3522) + +### Features + +- (golang) Add initialisms configuration (#3308) +- (compiler) Support subqueries in the FROM clause (second coming) (#3310) +- Managed databases with any accessible server (#3421) +- (vet) Use new dbmanager client (#3423) +- (verify) Update verify to work with managed databases (#3425) + +### Documentation + +- Fix typo in config (#3358) +- Resolve a typo in configuration keys (#3349) +- Add sponsorship information to README (#3413) +- Update the language-support to include C# (#3408) +- Add migration guide for hosted managed databases (#3417) +- Fix readme links (#3424) +- Update the managed db and verify documentation (#3426) +- Add sponsor image (#3428) +- Add Ruby as supported language (#3487) +- Update migrating-to-sqlc-gen-kotlin.md (#3454) +- Fix typo in comment (#3316) +- Fix deprecated build tag format (#3361) + +### Testing + +- (endtoend) Re-use databases when possible (#3315) +- Enabled MySQL database (#3318) +- Remove internal/sqltest/hosted package (#3521) + +(v1-26-0)= +## [1.26.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.26.0) +Released 2024-03-28 + +### Release notes + +This release is mainly a bug fix release. It also includes an [important security fix](https://github.com/sqlc-dev/sqlc/issues/3194) for users using output plugins. + +### Changes + +#### Bug Fixes + +- (docker) Use distroless base image instead of scratch (#3111) +- (generate) Ensure files are created inside output directory (#3195) +- (mysql) BREAKING: Use `int16` for MySQL `SMALLINT` and `YEAR` (#3106) +- (mysql) BREAKING: Use `int8` for MySQL TINYINT (#3298) +- (mysql) Variables not resolving in ORDER BY statements (#3115) +- (opts) Validate SQL package and driver options (#3241) +- (postgres/batch) Ignore query_parameter_limit for batches +- (scripts) Remove deprecated test output regeneration script (#3105) +- (sqlite) Correctly skip unknown statements (#3239) + +#### Documentation + +- (postgres) Add instructions for PostGIS/GEOS (#3182) +- Improve details on TEXT (#3247) + +#### Features + +- (generate) Avoid generating empty Go imports (#3135) +- (mysql) Add NEXTVAL() to the MySQL catalog (#3147) +- (mysql) Support json.RawMessage for LOAD DATA INFILE (#3099) + +#### Build + +- (deps) Bump github.com/jackc/pgx/v5 to 5.5.5 (#3259) +- (deps) Bump modernc.org/sqlite to 1.29.5 (#3200) +- (deps) Bump github.com/go-sql-driver/mysql to 1.8.0 (#3257) +- (deps) Bump github.com/tetratelabs/wazero to 1.7.0 (#3096) +- (deps) Bump github.com/pganalyze/pg_query_go to v5 (#3096) + + +(v1-25-0)= +## [1.25.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.25.0) +Released 2024-01-03 + +### Release notes + +#### Add tags to push and verify + +You can add tags when [pushing](../howto/push.md) schema and queries to [sqlc Cloud](https://dashboard.sqlc.dev). Tags operate like git tags, meaning you can overwrite previously-pushed tag values. We suggest tagging pushes to associate them with something relevant from your environment, e.g. a git tag or branch name. + +``` +$ sqlc push --tag v1.0.0 +``` + +Once you've created a tag, you can refer to it when [verifying](../howto/verify.md) changes, allowing you +to compare the existing schema against a known set of previous queries. + +``` +$ sqlc verify --against v1.0.0 +``` + +#### C-ya, `cgo` + +Over the last month, we've switched out a few different modules to remove our reliance on [cgo](https://go.dev/blog/cgo). Previously, we needed cgo for three separate functions: + +- Parsing PostgreSQL queries with [pganalyze/pg_query_go](https://github.com/pganalyze/pg_query_go) +- Running SQLite databases with [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) +- Executing WASM / WASI code with [bytecodealliance/wasmtime-go](https://github.com/bytecodealliance/wasmtime-go) + +With the help of the community, we found cgo-free alternatives for each module: + +- Parsing PostgreSQL queries, now using [wasilibs/go-pgquery](https://github.com/wasilibs/go-pgquery) +- Running SQLite databases, now using [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) +- Executing WASM / WASI code, now using [tetratelabs/wazero](https://github.com/tetratelabs/wazero) + +For the first time, Windows users can enjoy full PostgreSQL support without using [WSL](https://learn.microsoft.com/en-us/windows/wsl/about). It's a Christmas miracle! + +If you run into any issues with the updated dependencies, please [open an issue](https://github.com/sqlc-dev/sqlc/issues). + +### Changes + +#### Bug Fixes + +- (codegen) Wrong yaml annotation in go codegen options for output_querier_file_name (#3006) +- (codegen) Use derived ArrayDims instead of deprecated attndims (#3032) +- (codegen) Take the maximum array dimensions (#3034) +- (compiler) Skip analysis of queries without a `name` annotation (#3072) +- (codegen/golang) Don't import `"strings"` for `sqlc.slice()` with pgx (#3073) + +### Documentation + +- Add name to query set configuration (#3011) +- Add a sidebar link for `push`, add Go plugin link (#3023) +- Update banner for sqlc-gen-typescript (#3036) +- Add strict_order_by in doc (#3044) +- Re-order the migration tools list (#3064) + +### Features + +- (analyzer) Return zero values when encountering unexpected ast nodes (#3069) +- (codegen/go) add omit_sqlc_version to Go code generation (#3019) +- (codgen/go) Add `emit_sql_as_comment` option to Go code plugin (#2735) +- (plugins) Use wazero instead of wasmtime (#3042) +- (push) Add tag support (#3074) +- (sqlite) Support emit_pointers_for_null_types (#3026) + +### Testing + +- (endtoend) Enable for more build targets (#3041) +- (endtoend) Run MySQL and PostgreSQL locally on the runner (#3095) +- (typescript) Test against sqlc-gen-typescript (#3046) +- Add tests for omit_sqlc_version (#3020) +- Split schema and query for test (#3094) + +### Build + +- (deps) Bump idna from 3.4 to 3.6 in /docs (#3010) +- (deps) Bump sphinx-rtd-theme from 1.3.0 to 2.0.0 in /docs (#3016) +- (deps) Bump golang from 1.21.4 to 1.21.5 (#3043) +- (deps) Bump actions/setup-go from 4 to 5 (#3047) +- (deps) Bump github.com/jackc/pgx/v5 from 5.5.0 to 5.5.1 (#3050) +- (deps) Upgrade to latest version of github.com/wasilibs/go-pgquery (#3052) +- (deps) Bump google.golang.org/grpc from 1.59.0 to 1.60.0 (#3053) +- (deps) Bump babel from 2.13.1 to 2.14.0 in /docs (#3055) +- (deps) Bump actions/upload-artifact from 3 to 4 (#3061) +- (deps) Bump modernc.org/sqlite from 1.27.0 to 1.28.0 (#3062) +- (deps) Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#3068) +- (deps) Bump google.golang.org/grpc from 1.60.0 to 1.60.1 (#3070) +- (deps) Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 (#3079) +- (deps) Bump github.com/tetratelabs/wazero from 1.5.0 to 1.6.0 (#3096) +- (sqlite) Update to antlr 4.13.1 (#3086) +- (sqlite) Disable modernc for WASM (#3048) +- (sqlite) Switch from mattn/go-sqlite3 to modernc.org/sqlite (#3040) + +(v1-24-0)= +## [1.24.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.24.0) +Released 2023-11-22 + +### Release notes + +#### Verifying database schema changes + +Schema updates and poorly-written queries often bring down production databases. That’s bad. + +Out of the box, `sqlc generate` catches some of these issues. Running `sqlc vet` with the `sqlc/db-prepare` rule catches more subtle problems. But there is a large class of issues that sqlc can’t prevent by looking at current schema and queries alone. + +For instance, when a schema change is proposed, existing queries and code running in production might fail when the schema change is applied. Enter `sqlc verify`, which analyzes existing queries against new schema changes and errors if there are any issues. + +Let's look at an example. Assume you have these two tables in production. + +```sql +CREATE TABLE users ( + id UUID PRIMARY KEY +); + +CREATE TABLE user_actions ( + id UUID PRIMARY KEY, + user_id UUID NOT NULL, + action TEXT, + created_at TIMESTAMP +); +``` + +Your application contains the following query to join user actions against the users table. + +```sql +-- name: GetUserActions :many +SELECT * FROM users u +JOIN user_actions ua ON u.id = ua.user_id +ORDER BY created_at; +``` + +So far, so good. Then assume you propose this schema change: + +```sql +ALTER TABLE users ADD COLUMN created_at TIMESTAMP; +``` + +Running `sqlc generate` fails with this change, returning a `column reference "created_at" is ambiguous` error. You update your query to fix the issue. + +```sql +-- name: GetUserActions :many +SELECT * FROM users u +JOIN user_actions ua ON u.id = ua.user_id +ORDER BY u.created_at; +``` + +While that change fixes the issue, there's a production outage waiting to happen. When the schema change is applied, the existing `GetUserActions` query will begin to fail. The correct way to fix this is to deploy the updated query before applying the schema migration. + +It ensures migrations are safe to deploy by sending your current schema and queries to sqlc cloud. There, we run the queries for your latest push against your new schema changes. This check catches backwards incompatible schema changes for existing queries. + +Here `sqlc verify` alerts you to the fact that ORDER BY "created_at" is ambiguous. + +```sh +$ sqlc verify +FAIL: app query.sql + +=== Failed +=== FAIL: app query.sql GetUserActions + ERROR: column reference "created_at" is ambiguous (SQLSTATE 42702) +``` + +By the way, this scenario isn't made up! It happened to us a few weeks ago. We've been happily testing early versions of `verify` for the last two weeks and haven't had any issues since. + +This type of verification is only the start. If your application is deployed on-prem by your customers, `verify` could tell you if it's safe for your customers to rollback to an older version of your app, even after schema migrations have been run. + +#### Rename `upload` command to `push` + +We've renamed the `upload` sub-command to `push`. We changed the data sent along in a push request. Upload used to include the configuration file, migrations, queries, and all generated code. Push drops the generated code in favor of including the [plugin.GenerateRequest](https://buf.build/sqlc/sqlc/docs/main:plugin#plugin.GenerateRequest), which is the protocol buffer message we pass to codegen plugins. + +We also add annotations to each push. By default, we include these environment variables if they are present: + +``` +GITHUB_REPOSITORY +GITHUB_REF +GITHUB_REF_NAME +GITHUB_REF_TYPE +GITHUB_SHA +``` + +Like upload, `push` should be run when you tag a release of your application. We run it on every push to main, as we continuously deploy those commits. + +#### MySQL support in `createdb` + +The `createdb` command, added in the last release, now supports MySQL. If you have a cloud project configured, you can use `sqlc createdb` 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. + +#### Plugin interface refactor + +This release includes a refactored plugin interface to better support future functionality. Plugins now support different methods via a gRPC service interface, allowing plugins to support different functionality in a backwards-compatible way. + +By using gRPC interfaces, we can even (theoretically) support [remote plugins](https://github.com/sqlc-dev/sqlc/pull/2938), but that's something for another day. + +### Changes + +#### Bug Fixes + +- (engine/sqlite) Support CASE expr (#2926) +- (engine/sqlite) Support -> and ->> operators (#2927) +- (vet) Add a nil pointer check to prevent db/prepare panic (#2934) +- (compiler) Prevent panic when compiler is nil (#2942) +- (codegen/golang) Move more Go-specific config validation into the plugin (#2951) +- (compiler) No panic on full-qualified column names (#2956) +- (docs) Better discussion of type override nuances (#2972) +- (codegen) Never generate return structs for :exec (#2976) +- (generate) Update help text for generate to be more generic (#2981) +- (generate) Return an error instead of generating duplicate Go names (#2962) +- (codegen/golang) Pull opts into its own package (#2920) +- (config) Make some struct and field names less confusing (#2922) + +#### Features + +- (codegen) Remove Go specific overrides from codegen proto (#2929) +- (plugin) Use gRPC interface for codegen plugin communication (#2930) +- (plugin) Calculate SHA256 if it does not exist (#2935) +- (sqlc-gen-go) Add script to mirror code to sqlc-gen-go (#2952) +- (createdb) Add support for MySQL (#2980) +- (verify) Add new command to verify queries and migrations (#2986) + +#### Testing + +- (ci) New workflow for sqlc-gen-python (#2936) +- (ci) Rely on go.mod to determine which Go version to use (#2971) +- (tests) Add glob pattern tests to sqlpath.Glob (#2995) +- (examples) Use hosted MySQL databases for tests (#2982) +- (docs) Clean up a little, update LICENSE and README (#2941) + +#### Build + +- (deps) Bump babel from 2.13.0 to 2.13.1 in /docs (#2911) +- (deps) Bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#2944) +- (deps) Bump github.com/mattn/go-sqlite3 from 1.14.17 to 1.14.18 (#2945) +- (deps) Bump golang.org/x/sync from 0.4.0 to 0.5.0 (#2946) +- (deps) Bump github.com/jackc/pgx/v5 from 5.4.3 to 5.5.0 (#2947) +- (deps) Change github.com/pingcap/tidb/parser to github.com/pingcap/tidb/pkg/parser +- (deps) Bump github.com/google/cel-go from 0.18.1 to 0.18.2 (#2969) +- (deps) Bump urllib3 from 2.0.7 to 2.1.0 in /docs (#2975) +- (buf) Change root of Buf module (#2987) +- (deps) Bump certifi from 2023.7.22 to 2023.11.17 in /docs (#2993) +- (ci) Bump Go version from 1.21.3 to 1.21.4 in workflows and Dockerfile (#2961) + (v1-23-0)= ## [1.23.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.23.0) Released 2023-10-24 @@ -382,7 +918,7 @@ rules: !(postgresql.explain.plan.plans.all(p, has(p.index_name) || p.plans.all(p, has(p.index_name)))) ``` -The 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). +The 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.md#database). For the `postgresql` engine, `sqlc` runs diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 427379c0f5..fc244da3ae 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -1,17 +1,19 @@ # CLI -``` +```sh Usage: sqlc [command] Available Commands: compile Statically check SQL for syntax and type errors completion Generate the autocompletion script for the specified shell + createdb Create an ephemeral database diff Compare the generated files to the existing files - generate Generate Go code from SQL + generate Generate source code from SQL help Help about any command init Create an empty sqlc.yaml settings file - upload Upload the schema, queries, and configuration for this project + push Push the schema, queries, and configuration for this project + verify Verify schema, queries, and configuration for this project version Print the sqlc version number vet Vet examines queries @@ -22,4 +24,4 @@ Flags: --no-remote disable remote execution (default: false) Use "sqlc [command] --help" for more information about a command. -``` \ No newline at end of file +``` diff --git a/docs/reference/config.md b/docs/reference/config.md index e4e012679b..ff8bcd0890 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -34,6 +34,8 @@ sql: Each mapping in the `sql` collection has the following keys: +- `name`: + - An human-friendly identifier for this query set. Optional. - `engine`: - One of `postgresql`, `mysql` or `sqlite`. - `schema`: @@ -48,10 +50,12 @@ 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`: +- `analyzer`: - 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`. +- `strict_order_by` + - If true, return an error if a order by column is ambiguous. Defaults to `true`. ### codegen @@ -131,6 +135,8 @@ The `gen` mapping supports the following keys: - Output directory for generated code. - `sql_package`: - Either `pgx/v4`, `pgx/v5` or `database/sql`. Defaults to `database/sql`. +- `sql_driver`: + - Either `github.com/jackc/pgx/v4`, `github.com/jackc/pgx/v5`, `github.com/lib/pq` or `github.com/go-sql-driver/mysql`. No defaults. Required if query annotation `:copyfrom` is used. - `emit_db_tags`: - If true, add DB tags to generated structs. Defaults to `false`. - `emit_prepared_queries`: @@ -152,15 +158,19 @@ The `gen` mapping supports the following keys: - `emit_methods_with_db_argument`: - If true, generated methods will accept a DBTX argument instead of storing a DBTX on the `*Queries` struct. Defaults to `false`. - `emit_pointers_for_null_types`: - - If true and `sql_package` is set to `pgx/v4` or `pgx/v5`, generated types for nullable columns are emitted as pointers (ie. `*string`) instead of `database/sql` null types (ie. `NullString`). Defaults to `false`. + - If true, generated types for nullable columns are emitted as pointers (ie. `*string`) instead of `database/sql` null types (ie. `NullString`). Currently only supported for PostgreSQL if `sql_package` is `pgx/v4` or `pgx/v5`, and for SQLite. Defaults to `false`. - `emit_enum_valid_method`: - If true, generate a Valid method on enum types, indicating whether a string is a valid enum value. - `emit_all_enum_values`: - If true, emit a function per enum type that returns all valid enum values. +- `emit_sql_as_comment`: + - If true, emits the SQL statement as a code-block comment above the generated function, appending to any existing comments. Defaults to `false`. - `build_tags`: - If set, add a `//go:build ` directive at the beginning of each generated Go file. +- `initialisms`: + - An array of [initialisms](https://google.github.io/styleguide/go/decisions.html#initialisms) to upper-case. For example, `app_id` becomes `AppID`. Defaults to `["id"]`. - `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`: @@ -184,36 +194,11 @@ The `gen` mapping supports the following keys: - `rename`: - Customize the name of generated struct fields. See [Renaming fields](../howto/rename.md) for usage information. - `overrides`: - - It is a collection of definitions that dictates which types are used to map a database types. + - A collection of configurations to override sqlc's default Go type choices. See [Overriding types](../howto/overrides.md) for usage information. ##### overrides -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. -- `column`: - - In case the type overriding should be done on specific a column of a table instead of a type. `column` should be of the form `table.column` but you can be even more specific by specifying `schema.table.column` or `catalog.schema.table.column`. Can't be used if the `db_type` key is defined. -- `go_type`: - - A fully qualified name to a Go type to use in the generated code. -- `go_struct_tag`: - - A reflect-style struct tag to use in the generated code, e.g. `a:"b" x:"y,z"`. - If you want general json/db tags for all fields, use `emit_db_tags` and/or `emit_json_tags` instead. -- `nullable`: - - If `true`, use this type when a column is nullable. Defaults to `false`. - -For more complicated import paths, the `go_type` can also be an object with the following keys: - -- `import`: - - The import path for the package where the type is defined. -- `package`: - - The package name where the type is defined. This should only be necessary when your import path doesn't end with the desired package name. -- `type`: - - The type name itself, without any package prefix. -- `pointer`: - - If set to `true`, generated code will use pointers to the type rather than the type itself. -- `slice`: - - If set to `true`, generated code will use a slice of the type rather than the type itself. +See [Overriding types](../howto/overrides.md) for an in-depth guide to using type overrides. #### kotlin @@ -263,6 +248,8 @@ Each mapping in the `plugins` collection has the following keys: - `process`: A mapping with a single `cmd` key - `cmd`: - The executable to call when using this plugin + - `format`: + - The format expected. Supports `json` and `protobuf` formats. Defaults to `protobuf`. - `wasm`: A mapping with a two keys `url` and `sha256` - `url`: - The URL to fetch the WASM file. Supports the `https://` or `file://` schemes. @@ -344,7 +331,7 @@ overrides: rename: id: "Identifier" overrides: - - db_type: "timestamptz" + - db_type: "pg_catalog.timestamptz" nullable: true engine: "postgresql" go_type: @@ -356,7 +343,7 @@ sql: queries: "postgresql/query.sql" engine: "postgresql" gen: - go: + go: package: "authors" out: "postgresql" - schema: "mysql/schema.sql" @@ -431,6 +418,8 @@ Each mapping in the `packages` collection has the following keys: - Either `postgresql` or `mysql`. Defaults to `postgresql`. - `sql_package`: - Either `pgx/v4`, `pgx/v5` or `database/sql`. Defaults to `database/sql`. +- `overrides`: + - A list of type override configurations. See the [Overriding types](../howto/overrides.md) guide for details. - `emit_db_tags`: - If true, add DB tags to generated structs. Defaults to `false`. - `emit_prepared_queries`: @@ -482,78 +471,7 @@ Each mapping in the `packages` collection has the following keys: ### overrides -The default mapping of PostgreSQL/MySQL types to Go types only uses packages outside -the standard library when it must. - -For example, the `uuid` PostgreSQL type is mapped to `github.com/google/uuid`. -If a different Go package for UUIDs is required, specify the package in the -`overrides` array. In this case, I'm going to use the `github.com/gofrs/uuid` -instead. - -```yaml -version: "1" -packages: [...] -overrides: - - go_type: "github.com/gofrs/uuid.UUID" - db_type: "uuid" -``` - -Each override document 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. -- `go_type`: - - A fully qualified name to a Go type to use in the generated code. -- `go_struct_tag`: - - A reflect-style struct tag to use in the generated code, e.g. `a:"b" x:"y,z"`. - If you want general json/db tags for all fields, use `emit_db_tags` and/or `emit_json_tags` instead. -- `nullable`: - - If true, use this type when a column is nullable. Defaults to `false`. - -Note that a single `db_type` override configuration applies to either nullable or non-nullable -columns, but not both. If you want a single `go_type` to override in both cases, you'll -need to specify two overrides. - -For more complicated import paths, the `go_type` can also be an object. - -```yaml -version: "1" -packages: [...] -overrides: - - db_type: "uuid" - go_type: - import: "a/b/v2" - package: "b" - type: "MyType" -``` - -#### Per-Column Type Overrides - -Sometimes you would like to override the Go type used in model or query generation for -a specific field of a table and not on a type basis as described in the previous section. - -This may be configured by specifying the `column` property in the override definition. `column` -should be of the form `table.column` but you can be even more specific by specifying `schema.table.column` -or `catalog.schema.table.column`. - -```yaml -version: "1" -packages: [...] -overrides: - - column: "authors.id" - go_type: "github.com/segmentio/ksuid.KSUID" -``` - -#### Package Level Overrides - -Overrides can be configured globally, as demonstrated in the previous sections, or they can be configured per-package which -scopes the override behavior to just a single package: - -```yaml -version: "1" -packages: - - overrides: [...] -``` +See the version 1 configuration section of the [Overriding types](../howto/overrides.md#version-1-configuration) guide for details. ### rename diff --git a/docs/reference/datatypes.md b/docs/reference/datatypes.md index 542624a25e..14ceb42a3f 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.md#overrides) in your `sqlc` config file. ## Arrays @@ -62,7 +62,7 @@ type Author struct { ## Enums -PostgreSQL [enums](https://www.postgresql.org/docs/current/arrays.html) are +PostgreSQL [enums](https://www.postgresql.org/docs/current/datatype-enum.html) are mapped to an aliased string type. ```sql @@ -143,7 +143,9 @@ type Author struct { } ``` -For MySQL, there is no native `uuid` data type. When using `UUID_TO_BIN` to store a `UUID()`, the underlying field type is `BINARY(16)` which by default sqlc would interpret this to `sql.NullString`. To have sqlc automatically convert these fields to a `uuid.UUID` type, use an overide on the column storing the `uuid`. +For MySQL, there is no native `uuid` data type. When using `UUID_TO_BIN` to store a `UUID()`, the underlying field type is `BINARY(16)` which by default sqlc would map to `sql.NullString`. To have sqlc automatically convert these fields to a `uuid.UUID` type, use an overide on the column storing the `uuid` +(see [Overriding types](../howto/overrides.md) for details). + ```json { "overrides": [ @@ -158,8 +160,9 @@ For MySQL, there is no native `uuid` data type. When using `UUID_TO_BIN` to stor ## JSON By default, sqlc will generate the `[]byte`, `pgtype.JSON` or `json.RawMessage` for JSON column type. -But if you use the `pgx/v5` sql package then you can specify a some struct instead of default type. -The `pgx` implementation will marshall/unmarshall the struct automatically. +But if you use the `pgx/v5` sql package then you can specify a struct instead of the default type +(see [Overriding types](../howto/overrides.md) for details). +The `pgx` implementation will marshal/unmarshal the struct automatically. ```go package dto @@ -183,9 +186,10 @@ CREATE TABLE books ( { "column": "books.data", "go_type": { - "import":"example/db", + "import":"example.com/db", "package": "dto", - "type":"BookData" + "type":"BookData", + "pointer": true } } ] @@ -204,12 +208,83 @@ type Book struct { } ``` +## TEXT + +In PostgreSQL, when you have a column with the TEXT type, sqlc will map it to a Go string by default. This default mapping applies to `TEXT` columns that are not nullable. However, for nullable `TEXT` columns, sqlc maps them to `pgtype.Text` when using the pgx/v5 driver. This distinction is crucial for developers looking to handle null values appropriately in their Go applications. + +To accommodate nullable strings and map them to `*string` in Go, you can use the `emit_pointers_for_null_types` option in your sqlc configuration. This option ensures that nullable SQL columns are represented as pointer types in Go, allowing for a clear distinction between null and non-null values. Another way to do this is by passing the option `pointer: true` when you are overriding the `TEXT` datatype in your sqlc config file (see [Overriding types](../howto/overrides.md) for details). + ## Geometry ### PostGIS +#### Using `github.com/twpayne/go-geos` (pgx/v5 only) + +sqlc can be configured to use the [geos](https://github.com/twpayne/go-geos) +package for working with PostGIS geometry types in [GEOS](https://libgeos.org/). + +There are three steps: + +1. Configure sqlc to use `*github.com/twpayne/go-geos.Geom` for geometry types (see [Overriding types](../howto/overrides.md) for details). +2. Call `github.com/twpayne/pgx-geos.Register` on each + `*github.com/jackc/pgx/v5.Conn`. +3. Annotate your SQL with `::geometry` typecasts, if needed. + +```sql +-- Multipolygons in British National Grid (epsg:27700) +create table shapes( + id serial, + name varchar, + geom geometry(Multipolygon, 27700) +); + +-- name: GetCentroids :many +SELECT id, name, ST_Centroid(geom)::geometry FROM shapes; +``` + +```json +{ + "version": 2, + "gen": { + "go": { + "overrides": [ + { + "db_type": "geometry", + "go_type": { + "import": "github.com/twpayne/go-geos", + "package": "geos", + "pointer": true, + "type": "Geom" + }, + "nullable": true + } + ] + } + } +} +``` + +```go +import ( + "github.com/twpayne/go-geos" + pgxgeos "github.com/twpayne/pgx-geos" +) + +// ... + +config.AfterConnect = func(ctx context.Context, conn *pgx.Conn) error { + if err := pgxgeos.Register(ctx, conn, geos.NewContext()); err != nil { + return err + } + return nil +} +``` + + +#### Using `github.com/twpayne/go-geom` + sqlc can be configured to use the [geom](https://github.com/twpayne/go-geom) -package for working with PostGIS geometry types. +package for working with PostGIS geometry types. See [Overriding types](../howto/overrides.md) for more information. ```sql -- Multipolygons in British National Grid (epsg:27700) @@ -238,12 +313,12 @@ SELECT * FROM shapes; { "db_type": "geometry", "go_type": "github.com/twpayne/go-geom.MultiPolygon" - }, - { + }, + { "db_type": "geometry", - "go_type": "github.com/twpayne/go-geom.MultiPolygon", - "null": true - } + "go_type": "github.com/twpayne/go-geom.MultiPolygon", + "nullable": true + } ] } -``` \ No newline at end of file +``` diff --git a/docs/reference/language-support.rst b/docs/reference/language-support.rst index 37a4e192b6..d6532ba543 100644 --- a/docs/reference/language-support.rst +++ b/docs/reference/language-support.rst @@ -1,29 +1,51 @@ Database and language support ############################# -======== =================== ============ ============ =============== -Language Plugin MySQL PostgreSQL SQLite -======== =================== ============ ============ =============== -Go (built-in) Stable Stable Beta -Kotlin `sqlc-gen-kotlin`_ Beta Beta Not implemented -Python `sqlc-gen-python`_ Beta Beta Not implemented -======== =================== ============ ============ =============== +========== ======================= ============ ============ =============== +Language Plugin MySQL PostgreSQL SQLite +========== ======================= ============ ============ =============== +Go (built-in) Stable Stable Beta +Go `sqlc-gen-go`_ Stable Stable Beta +Kotlin `sqlc-gen-kotlin`_ Beta Beta Not implemented +Python `sqlc-gen-python`_ Beta Beta Not implemented +TypeScript `sqlc-gen-typescript`_ Beta Beta Not implemented +========== ======================= ============ ============ =============== Community language support ************************** -======== ============================== =============== ============ =============== -Language Plugin MySQL PostgreSQL SQLite -======== ============================== =============== ============ =============== -F# `kaashyapan/sqlc-gen-fsharp`_ Not implemented Beta Beta -======== ============================== =============== ============ =============== +New languages can be added via :doc:`plugins <../guides/plugins>`. +======== ================================= =============== =============== =============== +Language Plugin MySQL PostgreSQL SQLite +======== ================================= =============== =============== =============== +C# `DaredevilOSS/sqlc-gen-csharp`_ Stable Stable Stable +F# `kaashyapan/sqlc-gen-fsharp`_ N/A Beta Beta +Java `tandemdude/sqlc-gen-java`_ Beta Beta N/A +PHP `lcarilla/sqlc-plugin-php-dbal`_ Beta N/A N/A +Ruby `DaredevilOSS/sqlc-gen-ruby`_ Beta Beta Beta +Zig `tinyzimmer/sqlc-gen-zig`_ N/A Beta Beta +[Any] `fdietze/sqlc-gen-from-template`_ Stable Stable Stable +======== ================================= =============== =============== =============== + +Community projects +****************** + +======== ================================= =============== =============== =============== +Language Project MySQL PostgreSQL SQLite +======== ================================= =============== =============== =============== +Gleam `daniellionel01/parrot`_ Stable Stable Stable +======== ================================= =============== =============== =============== + +.. _sqlc-gen-go: https://github.com/sqlc-dev/sqlc-gen-go .. _kaashyapan/sqlc-gen-fsharp: https://github.com/kaashyapan/sqlc-gen-fsharp .. _sqlc-gen-kotlin: https://github.com/sqlc-dev/sqlc-gen-kotlin .. _sqlc-gen-python: https://github.com/sqlc-dev/sqlc-gen-python - -Future language support -************************ - -- `C# `_ -- `TypeScript `_ +.. _sqlc-gen-typescript: https://github.com/sqlc-dev/sqlc-gen-typescript +.. _DaredevilOSS/sqlc-gen-csharp: https://github.com/DaredevilOSS/sqlc-gen-csharp +.. _DaredevilOSS/sqlc-gen-ruby: https://github.com/DaredevilOSS/sqlc-gen-ruby +.. _fdietze/sqlc-gen-from-template: https://github.com/fdietze/sqlc-gen-from-template +.. _lcarilla/sqlc-plugin-php-dbal: https://github.com/lcarilla/sqlc-plugin-php-dbal +.. _tandemdude/sqlc-gen-java: https://github.com/tandemdude/sqlc-gen-java +.. _tinyzimmer/sqlc-gen-zig: https://github.com/tinyzimmer/sqlc-gen-zig +.. _daniellionel01/parrot: https://github.com/daniellionel01/parrot diff --git a/docs/reference/macros.md b/docs/reference/macros.md index 7c8bc67842..36c7c92420 100644 --- a/docs/reference/macros.md +++ b/docs/reference/macros.md @@ -116,4 +116,4 @@ Since the `/*SLICE:ages*/` placeholder is dynamically replaced on a per-query basis, this macro can't be used with prepared statements. See a full example in [Passing a slice as a parameter to a -query](../howto/select.html#mysql-and-sqlite). \ No newline at end of file +query](../howto/select.md#mysql-and-sqlite). diff --git a/docs/reference/query-annotations.md b/docs/reference/query-annotations.md index 0045f49fa7..4fabe05aae 100644 --- a/docs/reference/query-annotations.md +++ b/docs/reference/query-annotations.md @@ -222,3 +222,9 @@ func (b *CreateBookBatchResults) Close() error { //... } ``` + +## `:copyfrom` + +__NOTE: This command is driver and package specific, see [how to insert](../howto/insert.md#using-copyfrom) + +This command is used to insert rows a lot faster than sequential inserts. diff --git a/docs/requirements.txt b/docs/requirements.txt index 20e1188ec0..46685ac9b3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,27 +1,27 @@ -alabaster==0.7.13 -Babel==2.13.0 -certifi==2023.7.22 +Babel==2.17.0 +Jinja2==3.1.6 +MarkupSafe==3.0.2 +Pygments==2.19.2 +Sphinx==7.4.7 +certifi==2025.8.3 chardet==5.2.0 commonmark==0.9.1 -docutils==0.18.1 -idna==3.4 +docutils==0.20.1 +idna==3.10 imagesize==1.4.1 -Jinja2==3.1.2 -MarkupSafe==2.1.3 -myst-parser==2.0.0 -packaging==23.2 -Pygments==2.16.1 -pyparsing==3.1.1 -pytz==2023.3.post1 -requests==2.31.0 -snowballstemmer==2.2.0 -Sphinx==6.2.1 +myst-parser==4.0.1 +packaging==25.0 +pyparsing==3.2.3 +pytz==2025.2 +requests==2.32.5 +snowballstemmer==3.0.1 sphinx-favicon==1.0.1 -sphinx-rtd-theme==1.3.0 -sphinxcontrib-applehelp==1.0.7 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-serializinghtml==1.1.9 -sphinxcontrib-htmlhelp==2.0.4 +sphinx-rtd-theme==3.0.2 +sphinxcontrib-applehelp==2.0.0 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -urllib3==2.0.7 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 +sphinxext-rediraffe==0.2.7 +urllib3==2.5.0 diff --git a/docs/tutorials/getting-started-mysql.md b/docs/tutorials/getting-started-mysql.md index 7cf52972fc..1c436e7e6a 100644 --- a/docs/tutorials/getting-started-mysql.md +++ b/docs/tutorials/getting-started-mysql.md @@ -8,6 +8,8 @@ We'll generate Go code here, but other 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. +At the end, you'll push your SQL queries to [sqlc Cloud](https://dashboard.sqlc.dev/) for further insights and analysis. + ## Setting up Create a new directory called `sqlc-tutorial` and open it up. @@ -181,3 +183,39 @@ 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. + +## Query verification + +[sqlc Cloud](https://dashboard.sqlc.dev) provides additional verification, catching subtle bugs. To get started, create a +[dashboard account](https://dashboard.sqlc.dev). Once you've signed in, create a +project and generate an auth token. Add your project's ID to the `cloud` block +to your sqlc.yaml. + + +```yaml +version: "2" +cloud: + # Replace with your project ID from the sqlc Cloud dashboard + project: "" +sql: + - engine: "mysql" + queries: "query.sql" + schema: "schema.sql" + gen: + go: + package: "tutorial" + out: "tutorial" +``` + +Replace `` with your project ID from the sqlc Cloud dashboard. It +will look something like `01HA8SZH31HKYE9RR3N3N3TSJM`. + +And finally, set the `SQLC_AUTH_TOKEN` environment variable: + +```shell +export SQLC_AUTH_TOKEN="" +``` + +```shell +$ sqlc push --tag tutorial +``` diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md index 371783860c..a98c32ff37 100644 --- a/docs/tutorials/getting-started-postgresql.md +++ b/docs/tutorials/getting-started-postgresql.md @@ -8,12 +8,8 @@ We'll generate Go code here, but other 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. +At the end, you'll push your SQL queries to [sqlc +Cloud](https://dashboard.sqlc.dev/) for further insights and analysis. ## Setting up @@ -31,14 +27,10 @@ following contents: ```yaml version: "2" -cloud: - project: "" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" - database: - managed: true gen: go: package: "tutorial" @@ -46,12 +38,6 @@ 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. @@ -216,3 +202,47 @@ 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. + +## Query verification + +[sqlc Cloud](https://dashboard.sqlc.dev) provides additional verification, catching subtle bugs. To get started, create a +[dashboard account](https://dashboard.sqlc.dev). Once you've signed in, create a +project and generate an auth token. Add your project's ID to the `cloud` block +to your sqlc.yaml. + +```yaml +version: "2" +cloud: + # Replace with your project ID from the sqlc Cloud dashboard + project: "" +sql: + - engine: "postgresql" + queries: "query.sql" + schema: "schema.sql" + gen: + go: + package: "tutorial" + out: "tutorial" + sql_package: "pgx/v5" +``` + +Replace `` with your project ID from the sqlc Cloud dashboard. It +will look something like `01HA8SZH31HKYE9RR3N3N3TSJM`. + +And finally, set the `SQLC_AUTH_TOKEN` environment variable: + +```shell +export SQLC_AUTH_TOKEN="" +``` + +```shell +$ sqlc push --tag tutorial +``` + +In the sidebar, go to the "Queries" section to see your published queries. Run +`verify` to ensure that previously published queries continue to work against +updated database schema. + +```shell +$ sqlc verify --against tutorial +``` diff --git a/docs/tutorials/getting-started-sqlite.md b/docs/tutorials/getting-started-sqlite.md index f855e41af6..b3c2a570df 100644 --- a/docs/tutorials/getting-started-sqlite.md +++ b/docs/tutorials/getting-started-sqlite.md @@ -128,7 +128,7 @@ import ( "log" "reflect" - _ "github.com/mattn/go-sqlite3" + _ "modernc.org/sqlite" "tutorial.sqlc.dev/app/tutorial" ) @@ -139,7 +139,7 @@ var ddl string func run() error { ctx := context.Background() - db, err := sql.Open("sqlite3", ":memory:") + db, err := sql.Open("sqlite", ":memory:") if err != nil { return err } @@ -189,7 +189,7 @@ func main() { Before this code will compile you'll need to fetch the relevant SQLite driver: ```shell -go get github.com/mattn/go-sqlite3 +go get modernc.org/sqlite go build ./... ``` diff --git a/equinox.pub b/equinox.pub deleted file mode 100644 index f5a0c7e18c..0000000000 --- a/equinox.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN ECDSA PUBLIC KEY----- -MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEDhl+JQVqmY5ZmFMyVDmuEOpr1ufM1SaH -3k/+e5eSvl6yMqTRkdt1i2X0zYJfOde/ho6DZ9CeGjscy4/CR5bhxAWPxggbjErf -Ta40WM9gdZI81uX8O5ES2DYYblQAiVRL ------END ECDSA PUBLIC KEY----- diff --git a/examples/authors/mysql/db.go b/examples/authors/mysql/db.go index 53319147cf..fc409f7e3f 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.23.0 +// sqlc v1.30.0 package authors diff --git a/examples/authors/mysql/db_test.go b/examples/authors/mysql/db_test.go index 26f3035b34..96ec363f77 100644 --- a/examples/authors/mysql/db_test.go +++ b/examples/authors/mysql/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package authors @@ -8,14 +7,20 @@ import ( "database/sql" "testing" - "github.com/sqlc-dev/sqlc/internal/sqltest" + _ "github.com/go-sql-driver/mysql" + + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestAuthors(t *testing.T) { - sdb, cleanup := sqltest.MySQL(t, []string{"schema.sql"}) - defer cleanup() - ctx := context.Background() + uri := local.MySQL(t, []string{"schema.sql"}) + sdb, err := sql.Open("mysql", uri) + if err != nil { + t.Fatal(err) + } + defer sdb.Close() + db := New(sdb) // list all authors diff --git a/examples/authors/mysql/models.go b/examples/authors/mysql/models.go index bf140dc75a..24e47df1ef 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.23.0 +// sqlc v1.30.0 package authors diff --git a/examples/authors/mysql/query.sql.go b/examples/authors/mysql/query.sql.go index ac922bda12..03aeb2ca83 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.23.0 +// sqlc v1.30.0 // source: query.sql package authors diff --git a/examples/authors/postgresql/db.go b/examples/authors/postgresql/db.go index 9c1ade4b78..e1f93c6f1d 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.23.0 +// sqlc v1.30.0 package authors diff --git a/examples/authors/postgresql/db_test.go b/examples/authors/postgresql/db_test.go index bdcd90a547..0fdd8824be 100644 --- a/examples/authors/postgresql/db_test.go +++ b/examples/authors/postgresql/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package authors @@ -10,12 +9,12 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" - "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestAuthors(t *testing.T) { ctx := context.Background() - uri := hosted.PostgreSQL(t, []string{"schema.sql"}) + uri := local.PostgreSQL(t, []string{"schema.sql"}) db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) diff --git a/examples/authors/postgresql/models.go b/examples/authors/postgresql/models.go index ec5cc6dd52..7845b91a3d 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.23.0 +// sqlc v1.30.0 package authors diff --git a/examples/authors/postgresql/query.sql.go b/examples/authors/postgresql/query.sql.go index 1aba1c67b0..c3325a8524 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.23.0 +// sqlc v1.30.0 // source: query.sql package authors diff --git a/examples/authors/sqlc.yaml b/examples/authors/sqlc.yaml index cc36949653..57f2319ea1 100644 --- a/examples/authors/sqlc.yaml +++ b/examples/authors/sqlc.yaml @@ -2,11 +2,12 @@ version: '2' cloud: project: "01HAQMMECEYQYKFJN8MP16QC41" sql: -- schema: postgresql/schema.sql +- name: postgresql + schema: postgresql/schema.sql queries: postgresql/query.sql engine: postgresql database: - managed: true + uri: "${VET_TEST_EXAMPLES_POSTGRES_AUTHORS}" analyzer: database: false rules: @@ -17,11 +18,12 @@ sql: package: authors sql_package: pgx/v5 out: postgresql -- schema: mysql/schema.sql +- name: mysql + schema: mysql/schema.sql queries: mysql/query.sql engine: mysql database: - uri: root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/authors?multiStatements=true&parseTime=true + uri: "${VET_TEST_EXAMPLES_MYSQL_AUTHORS}" rules: - sqlc/db-prepare # - mysql-query-too-costly @@ -29,7 +31,8 @@ sql: go: package: authors out: mysql -- schema: sqlite/schema.sql +- name: sqlite + schema: sqlite/schema.sql queries: sqlite/query.sql engine: sqlite database: diff --git a/examples/authors/sqlite/db.go b/examples/authors/sqlite/db.go index 53319147cf..fc409f7e3f 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.23.0 +// sqlc v1.30.0 package authors diff --git a/examples/authors/sqlite/db_test.go b/examples/authors/sqlite/db_test.go index b07804b627..e10ce46069 100644 --- a/examples/authors/sqlite/db_test.go +++ b/examples/authors/sqlite/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package authors @@ -13,6 +12,7 @@ import ( func TestAuthors(t *testing.T) { sdb, cleanup := sqltest.SQLite(t, []string{"schema.sql"}) + defer sdb.Close() defer cleanup() ctx := context.Background() diff --git a/examples/authors/sqlite/models.go b/examples/authors/sqlite/models.go index bf140dc75a..24e47df1ef 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.23.0 +// sqlc v1.30.0 package authors diff --git a/examples/authors/sqlite/query.sql.go b/examples/authors/sqlite/query.sql.go index ac922bda12..03aeb2ca83 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.23.0 +// sqlc v1.30.0 // source: query.sql package authors diff --git a/examples/batch/postgresql/batch.go b/examples/batch/postgresql/batch.go index bc589afabd..44ab41b920 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.23.0 +// sqlc v1.30.0 // source: batch.go package batch diff --git a/examples/batch/postgresql/db.go b/examples/batch/postgresql/db.go index 6e27ebe958..b61e314055 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.23.0 +// sqlc v1.30.0 package batch diff --git a/examples/batch/postgresql/db_test.go b/examples/batch/postgresql/db_test.go index c39bd0b5ed..122fa1aa73 100644 --- a/examples/batch/postgresql/db_test.go +++ b/examples/batch/postgresql/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package batch @@ -10,11 +9,12 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" - "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" + + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestBatchBooks(t *testing.T) { - uri := hosted.PostgreSQL(t, []string{"schema.sql"}) + uri := local.PostgreSQL(t, []string{"schema.sql"}) ctx := context.Background() diff --git a/examples/batch/postgresql/models.go b/examples/batch/postgresql/models.go index 1f30d38859..5165b316d1 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.23.0 +// sqlc v1.30.0 package batch diff --git a/examples/batch/postgresql/querier.go b/examples/batch/postgresql/querier.go index 18138f2a50..d0ad76db3c 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.23.0 +// sqlc v1.30.0 package batch diff --git a/examples/batch/postgresql/query.sql.go b/examples/batch/postgresql/query.sql.go index 1f2be31432..b72dd3be28 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.23.0 +// sqlc v1.30.0 // source: query.sql package batch diff --git a/examples/batch/sqlc.json b/examples/batch/sqlc.json index 5b81b40786..2f6b9a9e7e 100644 --- a/examples/batch/sqlc.json +++ b/examples/batch/sqlc.json @@ -11,7 +11,7 @@ "queries": "postgresql/query.sql", "engine": "postgresql", "database": { - "managed": true + "uri": "${VET_TEST_EXAMPLES_POSTGRES_BATCH}" }, "analyzer": { "database": false diff --git a/examples/booktest/mysql/db.go b/examples/booktest/mysql/db.go index c2d2db7720..548c1a9fbe 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.23.0 +// sqlc v1.30.0 package booktest diff --git a/examples/booktest/mysql/db_test.go b/examples/booktest/mysql/db_test.go index 810b9d68c8..6f97178c94 100644 --- a/examples/booktest/mysql/db_test.go +++ b/examples/booktest/mysql/db_test.go @@ -1,21 +1,27 @@ //go:build examples -// +build examples package booktest import ( "context" + "database/sql" "testing" "time" - "github.com/sqlc-dev/sqlc/internal/sqltest" + _ "github.com/go-sql-driver/mysql" + + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestBooks(t *testing.T) { - db, cleanup := sqltest.MySQL(t, []string{"schema.sql"}) - defer cleanup() - ctx := context.Background() + uri := local.MySQL(t, []string{"schema.sql"}) + db, err := sql.Open("mysql", uri) + if err != nil { + t.Fatal(err) + } + defer db.Close() + dq := New(db) // create an author diff --git a/examples/booktest/mysql/models.go b/examples/booktest/mysql/models.go index a19a3cbfa5..1340059137 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.23.0 +// sqlc v1.30.0 package booktest diff --git a/examples/booktest/mysql/query.sql.go b/examples/booktest/mysql/query.sql.go index 79164c2962..887af77ce9 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.23.0 +// sqlc v1.30.0 // source: query.sql package booktest diff --git a/examples/booktest/postgresql/db.go b/examples/booktest/postgresql/db.go index 5b2f9098bb..cec8f99059 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.23.0 +// sqlc v1.30.0 package booktest diff --git a/examples/booktest/postgresql/db_test.go b/examples/booktest/postgresql/db_test.go index 8eeb10518c..ae71593852 100644 --- a/examples/booktest/postgresql/db_test.go +++ b/examples/booktest/postgresql/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package booktest @@ -11,12 +10,12 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" - "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestBooks(t *testing.T) { ctx := context.Background() - uri := hosted.PostgreSQL(t, []string{"schema.sql"}) + uri := local.PostgreSQL(t, []string{"schema.sql"}) db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) @@ -150,7 +149,18 @@ func TestBooks(t *testing.T) { t.Logf("Book %d: '%s', Author: '%s', ISBN: '%s' Tags: '%v'\n", ab.BookID, ab.Title, ab.Name.String, ab.Isbn, ab.Tags) } - // TODO: call say_hello(varchar) + // call function + pgText, err := dq.SayHello(ctx, "world") + if err != nil { + t.Fatal(err) + } + str, err := pgText.Value() + if err != nil { + t.Fatal(err) + } + if str != "hello world" { + t.Fatal("expected function result to be \"hello world\". actual:", str) + } // get book 4 and delete b5, err := dq.GetBook(ctx, b3.BookID) diff --git a/examples/booktest/postgresql/models.go b/examples/booktest/postgresql/models.go index 406ca78f0f..7df113ef89 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.23.0 +// sqlc v1.30.0 package booktest diff --git a/examples/booktest/postgresql/query.sql b/examples/booktest/postgresql/query.sql index 194897a4bb..75b8cd3b6d 100644 --- a/examples/booktest/postgresql/query.sql +++ b/examples/booktest/postgresql/query.sql @@ -58,3 +58,6 @@ WHERE book_id = $3; UPDATE books SET title = $1, tags = $2, isbn = $4 WHERE book_id = $3; + +-- name: SayHello :one +select * from say_hello($1); diff --git a/examples/booktest/postgresql/query.sql.go b/examples/booktest/postgresql/query.sql.go index 7fd42fdef7..dd2d557bbd 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.23.0 +// sqlc v1.30.0 // source: query.sql package booktest @@ -206,6 +206,17 @@ func (q *Queries) GetBook(ctx context.Context, bookID int32) (Book, error) { return i, err } +const sayHello = `-- name: SayHello :one +select say_hello from say_hello($1) +` + +func (q *Queries) SayHello(ctx context.Context, s string) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, sayHello, s) + var say_hello pgtype.Text + err := row.Scan(&say_hello) + return say_hello, err +} + const updateBook = `-- name: UpdateBook :exec UPDATE books SET title = $1, tags = $2 diff --git a/examples/booktest/postgresql/schema.sql b/examples/booktest/postgresql/schema.sql index 2beecaba1a..3cdd97ca5f 100644 --- a/examples/booktest/postgresql/schema.sql +++ b/examples/booktest/postgresql/schema.sql @@ -23,9 +23,9 @@ CREATE TABLE books ( CREATE INDEX books_title_idx ON books(title, year); -CREATE FUNCTION say_hello(text) RETURNS text AS $$ +CREATE FUNCTION say_hello(s text) RETURNS text AS $$ BEGIN - RETURN CONCAT('hello ', $1); + RETURN CONCAT('hello ', s); END; $$ LANGUAGE plpgsql; diff --git a/examples/booktest/sqlc.json b/examples/booktest/sqlc.json index 8f5ddad6e6..b0b0d71d01 100644 --- a/examples/booktest/sqlc.json +++ b/examples/booktest/sqlc.json @@ -12,7 +12,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "database": { - "managed": true + "uri": "${VET_TEST_EXAMPLES_POSTGRES_BOOKTEST}" }, "analyzer": { "database": false @@ -28,7 +28,7 @@ "queries": "mysql/query.sql", "engine": "mysql", "database": { - "uri": "root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/booktest?multiStatements=true&parseTime=true" + "uri": "${VET_TEST_EXAMPLES_MYSQL_BOOKTEST}" }, "rules": [ "sqlc/db-prepare" diff --git a/examples/booktest/sqlite/db.go b/examples/booktest/sqlite/db.go index c2d2db7720..548c1a9fbe 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.23.0 +// sqlc v1.30.0 package booktest diff --git a/examples/booktest/sqlite/db_test.go b/examples/booktest/sqlite/db_test.go index f169c79148..42a8b396b1 100644 --- a/examples/booktest/sqlite/db_test.go +++ b/examples/booktest/sqlite/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package booktest @@ -19,6 +18,7 @@ const ( func TestBooks(t *testing.T) { db, cleanup := sqltest.SQLite(t, []string{"schema.sql"}) + defer db.Close() defer cleanup() ctx := context.Background() diff --git a/examples/booktest/sqlite/models.go b/examples/booktest/sqlite/models.go index e3997f25fd..11bfe05d99 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.23.0 +// sqlc v1.30.0 package booktest diff --git a/examples/booktest/sqlite/query.sql.go b/examples/booktest/sqlite/query.sql.go index 814fd24c67..435399a965 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.23.0 +// sqlc v1.30.0 // source: query.sql package booktest diff --git a/examples/jets/postgresql/db.go b/examples/jets/postgresql/db.go index 5d495399b2..bccada1806 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.23.0 +// sqlc v1.30.0 package jets diff --git a/examples/jets/postgresql/models.go b/examples/jets/postgresql/models.go index 36acc85880..166bf06f3d 100644 --- a/examples/jets/postgresql/models.go +++ b/examples/jets/postgresql/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package jets -import () - type Jet struct { ID int32 PilotID int32 diff --git a/examples/jets/postgresql/query-building.sql.go b/examples/jets/postgresql/query-building.sql.go index 0e937c5ccd..0697bc12bc 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.23.0 +// sqlc v1.30.0 // source: query-building.sql package jets diff --git a/examples/jets/sqlc.json b/examples/jets/sqlc.json index d664966753..8dfa0df777 100644 --- a/examples/jets/sqlc.json +++ b/examples/jets/sqlc.json @@ -12,7 +12,7 @@ "engine": "postgresql", "sql_package": "pgx/v5", "database": { - "managed": true + "uri": "${VET_TEST_EXAMPLES_POSTGRES_JETS}" }, "analyzer": { "database": false diff --git a/examples/kotlin/.gitignore b/examples/kotlin/.gitignore deleted file mode 100644 index fbb16c8de7..0000000000 --- a/examples/kotlin/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.gradle/ -/.idea/ -/build/ -/out/ diff --git a/examples/kotlin/README.md b/examples/kotlin/README.md deleted file mode 100644 index 717425cb51..0000000000 --- a/examples/kotlin/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Kotlin examples - -This is a Kotlin gradle project configured to compile and test all examples. Currently tests have only been written for the `authors` example. - -To run tests: - -```shell script -docker run --name dinosql-postgres -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=postgres -p 5432:5432 postgres:11 -./gradlew clean test -``` - -The project can be easily imported into Intellij. - -1. Install Java if you don't already have it -1. Download Intellij IDEA Community Edition -1. In the "Welcome" modal, click "Import Project" -1. Open the `build.gradle` file adjacent to this README file -1. Wait for Intellij to sync the gradle modules and complete indexing diff --git a/examples/kotlin/build.gradle b/examples/kotlin/build.gradle deleted file mode 100644 index 0dfec90887..0000000000 --- a/examples/kotlin/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id 'org.jetbrains.kotlin.jvm' version '1.3.60' -} - -group 'com.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation 'mysql:mysql-connector-java:8.0.22' - implementation 'org.postgresql:postgresql:42.2.9' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0' -} - -test { - useJUnitPlatform() -} - -compileKotlin { - kotlinOptions.jvmTarget = "1.8" -} -compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" -} - -buildScan { - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" -} diff --git a/examples/kotlin/gradle.properties b/examples/kotlin/gradle.properties deleted file mode 100644 index 29e08e8ca8..0000000000 --- a/examples/kotlin/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -kotlin.code.style=official \ No newline at end of file diff --git a/examples/kotlin/gradle/wrapper/gradle-wrapper.jar b/examples/kotlin/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 87b738cbd0..0000000000 Binary files a/examples/kotlin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/examples/kotlin/gradle/wrapper/gradle-wrapper.properties b/examples/kotlin/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index fd68b0da3e..0000000000 --- a/examples/kotlin/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Sat Jan 25 10:45:34 EST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-all.zip -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStorePath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME diff --git a/examples/kotlin/gradlew b/examples/kotlin/gradlew deleted file mode 100755 index af6708ff22..0000000000 --- a/examples/kotlin/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/examples/kotlin/gradlew.bat b/examples/kotlin/gradlew.bat deleted file mode 100644 index 6d57edc706..0000000000 --- a/examples/kotlin/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/examples/kotlin/settings.gradle b/examples/kotlin/settings.gradle deleted file mode 100644 index 5a094655c6..0000000000 --- a/examples/kotlin/settings.gradle +++ /dev/null @@ -1,5 +0,0 @@ -plugins { - id("com.gradle.enterprise").version("3.1.1") -} - -rootProject.name = 'dbtest' diff --git a/examples/kotlin/sqlc.json b/examples/kotlin/sqlc.json deleted file mode 100644 index 284b76ec91..0000000000 --- a/examples/kotlin/sqlc.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "kt", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-kotlin_1.1.0.wasm", - "sha256": "57890144f4effed4fe71855418b87ad26d53dc5ed2030a66ad77e5e3a93d77fb" - } - } - ], - "sql": [ - { - "schema": "src/main/resources/authors/postgresql/schema.sql", - "queries": "src/main/resources/authors/postgresql/query.sql", - "engine": "postgresql", - "codegen": [ - { - "out": "src/main/kotlin/com/example/authors/postgresql", - "plugin": "kt", - "options": { - "package": "com.example.authors.postgresql" - } - } - ] - }, - { - "schema": "src/main/resources/ondeck/postgresql/schema", - "queries": "src/main/resources/ondeck/postgresql/query", - "engine": "postgresql", - "codegen": [ - { - "out": "src/main/kotlin/com/example/ondeck/postgresql", - "plugin": "kt", - "options": { - "package": "com.example.ondeck.postgresql" - } - } - ] - }, - { - "schema": "src/main/resources/jets/postgresql/schema.sql", - "queries": "src/main/resources/jets/postgresql/query-building.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "kt", - "out": "src/main/kotlin/com/example/jets", - "options": { - "package": "com.example.jets" - } - } - ] - }, - { - "schema": "src/main/resources/booktest/postgresql/schema.sql", - "queries": "src/main/resources/booktest/postgresql/query.sql", - "engine": "postgresql", - "codegen": [ - { - "out": "src/main/kotlin/com/example/booktest/postgresql", - "plugin": "kt", - "options": { - "package": "com.example.booktest.postgresql" - } - } - ] - }, - { - "schema": "src/main/resources/authors/mysql/schema.sql", - "queries": "src/main/resources/authors/mysql/query.sql", - "engine": "mysql", - "codegen": [ - { - "out": "src/main/kotlin/com/example/authors/mysql", - "plugin": "kt", - "options": { - "package": "com.example.authors.mysql" - } - } - ] - }, - { - "schema": "src/main/resources/booktest/mysql/schema.sql", - "queries": "src/main/resources/booktest/mysql/query.sql", - "engine": "mysql", - "codegen": [ - { - "out": "src/main/kotlin/com/example/booktest/mysql", - "plugin": "kt", - "options": { - "package": "com.example.booktest.mysql" - } - } - ] - }, - { - "schema": "src/main/resources/ondeck/mysql/schema", - "queries": "src/main/resources/ondeck/mysql/query", - "engine": "mysql", - "codegen": [ - { - "out": "src/main/kotlin/com/example/ondeck/mysql", - "plugin": "kt", - "options": { - "package": "com.example.ondeck.mysql" - } - } - ] - } - ] -} 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 deleted file mode 100644 index 9be77d5040..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Models.kt +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.authors.mysql - -data class Author ( - val id: Long, - val name: String, - val bio: String? -) - 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 deleted file mode 100644 index 0b42198964..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/Queries.kt +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.authors.mysql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement - -interface Queries { - @Throws(SQLException::class) - fun createAuthor(name: String, bio: String?): Long - - @Throws(SQLException::class) - fun deleteAuthor(id: Long) - - @Throws(SQLException::class) - fun getAuthor(id: Long): Author? - - @Throws(SQLException::class) - fun listAuthors(): List - -} - 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 deleted file mode 100644 index 4b85917942..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/authors/mysql/QueriesImpl.kt +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.authors.mysql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement - -const val createAuthor = """-- name: createAuthor :execresult -INSERT INTO authors ( - name, bio -) VALUES ( - ?, ? -) -""" - -const val deleteAuthor = """-- name: deleteAuthor :exec -DELETE FROM authors -WHERE id = ? -""" - -const val getAuthor = """-- name: getAuthor :one -SELECT id, name, bio FROM authors -WHERE id = ? LIMIT 1 -""" - -const val listAuthors = """-- name: listAuthors :many -SELECT id, name, bio FROM authors -ORDER BY name -""" - -class QueriesImpl(private val conn: Connection) : Queries { - - @Throws(SQLException::class) - override fun createAuthor(name: String, bio: String?): Long { - return conn.prepareStatement(createAuthor, Statement.RETURN_GENERATED_KEYS).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, bio) - - stmt.execute() - - val results = stmt.generatedKeys - if (!results.next()) { - throw SQLException("no generated key returned") - } - results.getLong(1) - } - } - - @Throws(SQLException::class) - override fun deleteAuthor(id: Long) { - conn.prepareStatement(deleteAuthor).use { stmt -> - stmt.setLong(1, id) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun getAuthor(id: Long): Author? { - return conn.prepareStatement(getAuthor).use { stmt -> - stmt.setLong(1, id) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Author( - results.getLong(1), - results.getString(2), - results.getString(3) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun listAuthors(): List { - return conn.prepareStatement(listAuthors).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Author( - results.getLong(1), - results.getString(2), - results.getString(3) - )) - } - ret - } - } - -} - 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 deleted file mode 100644 index cbabdb186e..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Models.kt +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.authors.postgresql - -data class Author ( - val id: Long, - val name: String, - val bio: String? -) - 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 deleted file mode 100644 index 2b46cddbb5..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/Queries.kt +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.authors.postgresql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement - -interface Queries { - @Throws(SQLException::class) - fun createAuthor(name: String, bio: String?): Author? - - @Throws(SQLException::class) - fun deleteAuthor(id: Long) - - @Throws(SQLException::class) - fun getAuthor(id: Long): Author? - - @Throws(SQLException::class) - fun listAuthors(): List - -} - 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 deleted file mode 100644 index 3ef6a8b32a..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/authors/postgresql/QueriesImpl.kt +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.authors.postgresql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement - -const val createAuthor = """-- name: createAuthor :one -INSERT INTO authors ( - name, bio -) VALUES ( - ?, ? -) -RETURNING id, name, bio -""" - -const val deleteAuthor = """-- name: deleteAuthor :exec -DELETE FROM authors -WHERE id = ? -""" - -const val getAuthor = """-- name: getAuthor :one -SELECT id, name, bio FROM authors -WHERE id = ? LIMIT 1 -""" - -const val listAuthors = """-- name: listAuthors :many -SELECT id, name, bio FROM authors -ORDER BY name -""" - -class QueriesImpl(private val conn: Connection) : Queries { - - @Throws(SQLException::class) - override fun createAuthor(name: String, bio: String?): Author? { - return conn.prepareStatement(createAuthor).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, bio) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Author( - results.getLong(1), - results.getString(2), - results.getString(3) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun deleteAuthor(id: Long) { - conn.prepareStatement(deleteAuthor).use { stmt -> - stmt.setLong(1, id) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun getAuthor(id: Long): Author? { - return conn.prepareStatement(getAuthor).use { stmt -> - stmt.setLong(1, id) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Author( - results.getLong(1), - results.getString(2), - results.getString(3) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun listAuthors(): List { - return conn.prepareStatement(listAuthors).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Author( - results.getLong(1), - results.getString(2), - results.getString(3) - )) - } - ret - } - } - -} - 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 deleted file mode 100644 index fe69ac9c01..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Models.kt +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.booktest.mysql - -import java.time.LocalDateTime - -enum class BooksBookType(val value: String) { - FICTION("FICTION"), - NONFICTION("NONFICTION"); - - companion object { - private val map = BooksBookType.values().associateBy(BooksBookType::value) - fun lookup(value: String) = map[value] - } -} - -data class Author ( - val authorId: Int, - val name: String -) - -data class Book ( - val bookId: Int, - val authorId: Int, - val isbn: String, - val bookType: BooksBookType, - val title: String, - val yr: Int, - val available: LocalDateTime, - val tags: String -) - 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 deleted file mode 100644 index 043312876f..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/Queries.kt +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.booktest.mysql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.time.LocalDateTime - -interface Queries { - @Throws(SQLException::class) - fun booksByTags(tags: String): List - - @Throws(SQLException::class) - fun booksByTitleYear(title: String, yr: Int): List - - @Throws(SQLException::class) - fun createAuthor(name: String): Long - - @Throws(SQLException::class) - fun createBook( - authorId: Int, - isbn: String, - bookType: BooksBookType, - title: String, - yr: Int, - available: LocalDateTime, - tags: String): Long - - @Throws(SQLException::class) - fun deleteAuthorBeforeYear(yr: Int, authorId: Int) - - @Throws(SQLException::class) - fun deleteBook(bookId: Int) - - @Throws(SQLException::class) - fun getAuthor(authorId: Int): Author? - - @Throws(SQLException::class) - fun getBook(bookId: Int): Book? - - @Throws(SQLException::class) - fun updateBook( - title: String, - tags: String, - bookId: Int) - - @Throws(SQLException::class) - fun updateBookISBN( - title: String, - tags: String, - isbn: String, - bookId: Int) - -} - 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 deleted file mode 100644 index 3589f1a396..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/mysql/QueriesImpl.kt +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.booktest.mysql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.time.LocalDateTime - -const val booksByTags = """-- name: booksByTags :many -SELECT - book_id, - title, - name, - isbn, - tags -FROM books -LEFT JOIN authors ON books.author_id = authors.author_id -WHERE tags = ? -""" - -data class BooksByTagsRow ( - val bookId: Int, - val title: String, - val name: String?, - val isbn: String, - val tags: String -) - -const val booksByTitleYear = """-- name: booksByTitleYear :many -SELECT book_id, author_id, isbn, book_type, title, yr, available, tags FROM books -WHERE title = ? AND yr = ? -""" - -const val createAuthor = """-- name: createAuthor :execresult -INSERT INTO authors (name) VALUES (?) -""" - -const val createBook = """-- name: createBook :execresult -INSERT INTO books ( - author_id, - isbn, - book_type, - title, - yr, - available, - tags -) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ? -) -""" - -const val deleteAuthorBeforeYear = """-- name: deleteAuthorBeforeYear :exec -DELETE FROM books -WHERE yr < ? AND author_id = ? -""" - -const val deleteBook = """-- name: deleteBook :exec -DELETE FROM books -WHERE book_id = ? -""" - -const val getAuthor = """-- name: getAuthor :one -SELECT author_id, name FROM authors -WHERE author_id = ? -""" - -const val getBook = """-- name: getBook :one -SELECT book_id, author_id, isbn, book_type, title, yr, available, tags FROM books -WHERE book_id = ? -""" - -const val updateBook = """-- name: updateBook :exec -UPDATE books -SET title = ?, tags = ? -WHERE book_id = ? -""" - -const val updateBookISBN = """-- name: updateBookISBN :exec -UPDATE books -SET title = ?, tags = ?, isbn = ? -WHERE book_id = ? -""" - -class QueriesImpl(private val conn: Connection) : Queries { - - @Throws(SQLException::class) - override fun booksByTags(tags: String): List { - return conn.prepareStatement(booksByTags).use { stmt -> - stmt.setString(1, tags) - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(BooksByTagsRow( - results.getInt(1), - results.getString(2), - results.getString(3), - results.getString(4), - results.getString(5) - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun booksByTitleYear(title: String, yr: Int): List { - return conn.prepareStatement(booksByTitleYear).use { stmt -> - stmt.setString(1, title) - stmt.setInt(2, yr) - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Book( - results.getInt(1), - results.getInt(2), - results.getString(3), - BooksBookType.lookup(results.getString(4))!!, - results.getString(5), - results.getInt(6), - results.getObject(7, LocalDateTime::class.java), - results.getString(8) - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun createAuthor(name: String): Long { - return conn.prepareStatement(createAuthor, Statement.RETURN_GENERATED_KEYS).use { stmt -> - stmt.setString(1, name) - - stmt.execute() - - val results = stmt.generatedKeys - if (!results.next()) { - throw SQLException("no generated key returned") - } - results.getLong(1) - } - } - - @Throws(SQLException::class) - override fun createBook( - authorId: Int, - isbn: String, - bookType: BooksBookType, - title: String, - yr: Int, - available: LocalDateTime, - tags: String): Long { - return conn.prepareStatement(createBook, Statement.RETURN_GENERATED_KEYS).use { stmt -> - stmt.setInt(1, authorId) - stmt.setString(2, isbn) - stmt.setString(3, bookType.value) - stmt.setString(4, title) - stmt.setInt(5, yr) - stmt.setObject(6, available) - stmt.setString(7, tags) - - stmt.execute() - - val results = stmt.generatedKeys - if (!results.next()) { - throw SQLException("no generated key returned") - } - results.getLong(1) - } - } - - @Throws(SQLException::class) - override fun deleteAuthorBeforeYear(yr: Int, authorId: Int) { - conn.prepareStatement(deleteAuthorBeforeYear).use { stmt -> - stmt.setInt(1, yr) - stmt.setInt(2, authorId) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun deleteBook(bookId: Int) { - conn.prepareStatement(deleteBook).use { stmt -> - stmt.setInt(1, bookId) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun getAuthor(authorId: Int): Author? { - return conn.prepareStatement(getAuthor).use { stmt -> - stmt.setInt(1, authorId) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Author( - results.getInt(1), - results.getString(2) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun getBook(bookId: Int): Book? { - return conn.prepareStatement(getBook).use { stmt -> - stmt.setInt(1, bookId) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Book( - results.getInt(1), - results.getInt(2), - results.getString(3), - BooksBookType.lookup(results.getString(4))!!, - results.getString(5), - results.getInt(6), - results.getObject(7, LocalDateTime::class.java), - results.getString(8) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun updateBook( - title: String, - tags: String, - bookId: Int) { - conn.prepareStatement(updateBook).use { stmt -> - stmt.setString(1, title) - stmt.setString(2, tags) - stmt.setInt(3, bookId) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun updateBookISBN( - title: String, - tags: String, - isbn: String, - bookId: Int) { - conn.prepareStatement(updateBookISBN).use { stmt -> - stmt.setString(1, title) - stmt.setString(2, tags) - stmt.setString(3, isbn) - stmt.setInt(4, bookId) - - stmt.execute() - } - } - -} - 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 deleted file mode 100644 index e77993a3d4..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Models.kt +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.booktest.postgresql - -import java.time.OffsetDateTime - -enum class BookType(val value: String) { - FICTION("FICTION"), - NONFICTION("NONFICTION"); - - companion object { - private val map = BookType.values().associateBy(BookType::value) - fun lookup(value: String) = map[value] - } -} - -data class Author ( - val authorId: Int, - val name: String -) - -data class Book ( - val bookId: Int, - val authorId: Int, - val isbn: String, - val bookType: BookType, - val title: String, - val year: Int, - val available: OffsetDateTime, - val tags: List -) - 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 deleted file mode 100644 index cfeec4dd45..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/Queries.kt +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.booktest.postgresql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.sql.Types -import java.time.OffsetDateTime - -interface Queries { - @Throws(SQLException::class) - fun booksByTags(dollar1: List): List - - @Throws(SQLException::class) - fun booksByTitleYear(title: String, year: Int): List - - @Throws(SQLException::class) - fun createAuthor(name: String): Author? - - @Throws(SQLException::class) - fun createBook( - authorId: Int, - isbn: String, - bookType: BookType, - title: String, - year: Int, - available: OffsetDateTime, - tags: List): Book? - - @Throws(SQLException::class) - fun deleteBook(bookId: Int) - - @Throws(SQLException::class) - fun getAuthor(authorId: Int): Author? - - @Throws(SQLException::class) - fun getBook(bookId: Int): Book? - - @Throws(SQLException::class) - fun updateBook( - title: String, - tags: List, - bookId: Int) - - @Throws(SQLException::class) - fun updateBookISBN( - title: String, - tags: List, - isbn: String, - bookId: Int) - -} - 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 deleted file mode 100644 index e6f10ebae8..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/booktest/postgresql/QueriesImpl.kt +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.booktest.postgresql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.sql.Types -import java.time.OffsetDateTime - -const val booksByTags = """-- name: booksByTags :many -SELECT - book_id, - title, - name, - isbn, - tags -FROM books -LEFT JOIN authors ON books.author_id = authors.author_id -WHERE tags && ?::varchar[] -""" - -data class BooksByTagsRow ( - val bookId: Int, - val title: String, - val name: String?, - val isbn: String, - val tags: List -) - -const val booksByTitleYear = """-- name: booksByTitleYear :many -SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books -WHERE title = ? AND year = ? -""" - -const val createAuthor = """-- name: createAuthor :one -INSERT INTO authors (name) VALUES (?) -RETURNING author_id, name -""" - -const val createBook = """-- name: createBook :one -INSERT INTO books ( - author_id, - isbn, - book_type, - title, - year, - available, - tags -) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ? -) -RETURNING book_id, author_id, isbn, book_type, title, year, available, tags -""" - -const val deleteBook = """-- name: deleteBook :exec -DELETE FROM books -WHERE book_id = ? -""" - -const val getAuthor = """-- name: getAuthor :one -SELECT author_id, name FROM authors -WHERE author_id = ? -""" - -const val getBook = """-- name: getBook :one -SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books -WHERE book_id = ? -""" - -const val updateBook = """-- name: updateBook :exec -UPDATE books -SET title = ?, tags = ? -WHERE book_id = ? -""" - -const val updateBookISBN = """-- name: updateBookISBN :exec -UPDATE books -SET title = ?, tags = ?, isbn = ? -WHERE book_id = ? -""" - -class QueriesImpl(private val conn: Connection) : Queries { - - @Throws(SQLException::class) - override fun booksByTags(dollar1: List): List { - return conn.prepareStatement(booksByTags).use { stmt -> - stmt.setArray(1, conn.createArrayOf("pg_catalog.varchar", dollar1.toTypedArray())) - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(BooksByTagsRow( - results.getInt(1), - results.getString(2), - results.getString(3), - results.getString(4), - (results.getArray(5).array as Array).toList() - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun booksByTitleYear(title: String, year: Int): List { - return conn.prepareStatement(booksByTitleYear).use { stmt -> - stmt.setString(1, title) - stmt.setInt(2, year) - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Book( - results.getInt(1), - results.getInt(2), - results.getString(3), - BookType.lookup(results.getString(4))!!, - results.getString(5), - results.getInt(6), - results.getObject(7, OffsetDateTime::class.java), - (results.getArray(8).array as Array).toList() - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun createAuthor(name: String): Author? { - return conn.prepareStatement(createAuthor).use { stmt -> - stmt.setString(1, name) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Author( - results.getInt(1), - results.getString(2) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun createBook( - authorId: Int, - isbn: String, - bookType: BookType, - title: String, - year: Int, - available: OffsetDateTime, - tags: List): Book? { - return conn.prepareStatement(createBook).use { stmt -> - stmt.setInt(1, authorId) - stmt.setString(2, isbn) - stmt.setObject(3, bookType.value, Types.OTHER) - stmt.setString(4, title) - stmt.setInt(5, year) - stmt.setObject(6, available) - stmt.setArray(7, conn.createArrayOf("pg_catalog.varchar", tags.toTypedArray())) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Book( - results.getInt(1), - results.getInt(2), - results.getString(3), - BookType.lookup(results.getString(4))!!, - results.getString(5), - results.getInt(6), - results.getObject(7, OffsetDateTime::class.java), - (results.getArray(8).array as Array).toList() - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun deleteBook(bookId: Int) { - conn.prepareStatement(deleteBook).use { stmt -> - stmt.setInt(1, bookId) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun getAuthor(authorId: Int): Author? { - return conn.prepareStatement(getAuthor).use { stmt -> - stmt.setInt(1, authorId) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Author( - results.getInt(1), - results.getString(2) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun getBook(bookId: Int): Book? { - return conn.prepareStatement(getBook).use { stmt -> - stmt.setInt(1, bookId) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Book( - results.getInt(1), - results.getInt(2), - results.getString(3), - BookType.lookup(results.getString(4))!!, - results.getString(5), - results.getInt(6), - results.getObject(7, OffsetDateTime::class.java), - (results.getArray(8).array as Array).toList() - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun updateBook( - title: String, - tags: List, - bookId: Int) { - conn.prepareStatement(updateBook).use { stmt -> - stmt.setString(1, title) - stmt.setArray(2, conn.createArrayOf("pg_catalog.varchar", tags.toTypedArray())) - stmt.setInt(3, bookId) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun updateBookISBN( - title: String, - tags: List, - isbn: String, - bookId: Int) { - conn.prepareStatement(updateBookISBN).use { stmt -> - stmt.setString(1, title) - stmt.setArray(2, conn.createArrayOf("pg_catalog.varchar", tags.toTypedArray())) - stmt.setString(3, isbn) - stmt.setInt(4, bookId) - - stmt.execute() - } - } - -} - diff --git a/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt b/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt deleted file mode 100644 index 9505c32310..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/jets/Models.kt +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.jets - -data class Jet ( - val id: Int, - val pilotId: Int, - val age: Int, - val name: String, - val color: String -) - -data class Language ( - val id: Int, - val language: String -) - -data class Pilot ( - val id: Int, - val name: String -) - -data class PilotLanguage ( - val pilotId: Int, - val languageId: Int -) - diff --git a/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt b/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt deleted file mode 100644 index 0c4892a587..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/jets/Queries.kt +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.jets - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement - -interface Queries { - @Throws(SQLException::class) - fun countPilots(): Long? - - @Throws(SQLException::class) - fun deletePilot(id: Int) - - @Throws(SQLException::class) - fun listPilots(): List - -} - diff --git a/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt b/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt deleted file mode 100644 index a3b1737529..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/jets/QueriesImpl.kt +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.jets - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement - -const val countPilots = """-- name: countPilots :one -SELECT COUNT(*) FROM pilots -""" - -const val deletePilot = """-- name: deletePilot :exec -DELETE FROM pilots WHERE id = ? -""" - -const val listPilots = """-- name: listPilots :many -SELECT id, name FROM pilots LIMIT 5 -""" - -class QueriesImpl(private val conn: Connection) : Queries { - - @Throws(SQLException::class) - override fun countPilots(): Long? { - return conn.prepareStatement(countPilots).use { stmt -> - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = results.getLong(1) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun deletePilot(id: Int) { - conn.prepareStatement(deletePilot).use { stmt -> - stmt.setInt(1, id) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun listPilots(): List { - return conn.prepareStatement(listPilots).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Pilot( - results.getInt(1), - results.getString(2) - )) - } - ret - } - } - -} - 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 deleted file mode 100644 index 38f26a50a2..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Models.kt +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.ondeck.mysql - -import java.sql.Timestamp -import java.time.Instant - -enum class VenueStatus(val value: String) { - OPEN("open"), - CLOSED("closed"); - - companion object { - private val map = VenueStatus.values().associateBy(VenueStatus::value) - fun lookup(value: String) = map[value] - } -} - -data class City ( - val slug: String, - val name: String -) - -// Venues are places where muisc happens -data class Venue ( - val id: Long, - // Venues can be either open or closed - val status: VenueStatus, - val statuses: String?, - // This value appears in public URLs - val slug: String, - val name: String, - val city: String, - val spotifyPlaylist: String, - val songkickId: String?, - val tags: String?, - val createdAt: Instant -) - 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 deleted file mode 100644 index 39a7a1bf2d..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/Queries.kt +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.ondeck.mysql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.sql.Timestamp -import java.time.Instant - -interface Queries { - @Throws(SQLException::class) - fun createCity(name: String, slug: String) - - @Throws(SQLException::class) - fun createVenue( - slug: String, - name: String, - city: String, - spotifyPlaylist: String, - status: VenueStatus, - statuses: String?, - tags: String?): Long - - @Throws(SQLException::class) - fun deleteVenue(slug: String, slug_2: String) - - @Throws(SQLException::class) - fun getCity(slug: String): City? - - @Throws(SQLException::class) - fun getVenue(slug: String, city: String): Venue? - - @Throws(SQLException::class) - fun listCities(): List - - @Throws(SQLException::class) - fun listVenues(city: String): List - - @Throws(SQLException::class) - fun updateCityName(name: String, slug: String) - - @Throws(SQLException::class) - fun updateVenueName(name: String, slug: String) - - @Throws(SQLException::class) - fun venueCountByCity(): List - -} - 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 deleted file mode 100644 index cb364c864e..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/mysql/QueriesImpl.kt +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.ondeck.mysql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.sql.Timestamp -import java.time.Instant - -const val createCity = """-- name: createCity :exec -INSERT INTO city ( - name, - slug -) VALUES ( - ?, - ? -) -""" - -const val createVenue = """-- name: createVenue :execresult -INSERT INTO venue ( - slug, - name, - city, - created_at, - spotify_playlist, - status, - statuses, - tags -) VALUES ( - ?, - ?, - ?, - NOW(), - ?, - ?, - ?, - ? -) -""" - -const val deleteVenue = """-- name: deleteVenue :exec -DELETE FROM venue -WHERE slug = ? AND slug = ? -""" - -const val getCity = """-- name: getCity :one -SELECT slug, name -FROM city -WHERE slug = ? -""" - -const val getVenue = """-- name: getVenue :one -SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at -FROM venue -WHERE slug = ? AND city = ? -""" - -const val listCities = """-- name: listCities :many -SELECT slug, name -FROM city -ORDER BY name -""" - -const val listVenues = """-- name: listVenues :many -SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at -FROM venue -WHERE city = ? -ORDER BY name -""" - -const val updateCityName = """-- name: updateCityName :exec -UPDATE city -SET name = ? -WHERE slug = ? -""" - -const val updateVenueName = """-- name: updateVenueName :exec -UPDATE venue -SET name = ? -WHERE slug = ? -""" - -const val venueCountByCity = """-- name: venueCountByCity :many -SELECT - city, - count(*) -FROM venue -GROUP BY 1 -ORDER BY 1 -""" - -data class VenueCountByCityRow ( - val city: String, - val count: Long -) - -class QueriesImpl(private val conn: Connection) : Queries { - - @Throws(SQLException::class) - override fun createCity(name: String, slug: String) { - conn.prepareStatement(createCity).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, slug) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun createVenue( - slug: String, - name: String, - city: String, - spotifyPlaylist: String, - status: VenueStatus, - statuses: String?, - tags: String?): Long { - return conn.prepareStatement(createVenue, Statement.RETURN_GENERATED_KEYS).use { stmt -> - stmt.setString(1, slug) - stmt.setString(2, name) - stmt.setString(3, city) - stmt.setString(4, spotifyPlaylist) - stmt.setString(5, status.value) - stmt.setString(6, statuses) - stmt.setString(7, tags) - - stmt.execute() - - val results = stmt.generatedKeys - if (!results.next()) { - throw SQLException("no generated key returned") - } - results.getLong(1) - } - } - - @Throws(SQLException::class) - override fun deleteVenue(slug: String, slug_2: String) { - conn.prepareStatement(deleteVenue).use { stmt -> - stmt.setString(1, slug) - stmt.setString(2, slug_2) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun getCity(slug: String): City? { - return conn.prepareStatement(getCity).use { stmt -> - stmt.setString(1, slug) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = City( - results.getString(1), - results.getString(2) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun getVenue(slug: String, city: String): Venue? { - return conn.prepareStatement(getVenue).use { stmt -> - stmt.setString(1, slug) - stmt.setString(2, city) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Venue( - results.getLong(1), - VenueStatus.lookup(results.getString(2))!!, - results.getString(3), - results.getString(4), - results.getString(5), - results.getString(6), - results.getString(7), - results.getString(8), - results.getString(9), - results.getTimestamp(10).toInstant() - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun listCities(): List { - return conn.prepareStatement(listCities).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(City( - results.getString(1), - results.getString(2) - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun listVenues(city: String): List { - return conn.prepareStatement(listVenues).use { stmt -> - stmt.setString(1, city) - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Venue( - results.getLong(1), - VenueStatus.lookup(results.getString(2))!!, - results.getString(3), - results.getString(4), - results.getString(5), - results.getString(6), - results.getString(7), - results.getString(8), - results.getString(9), - results.getTimestamp(10).toInstant() - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun updateCityName(name: String, slug: String) { - conn.prepareStatement(updateCityName).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, slug) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun updateVenueName(name: String, slug: String) { - conn.prepareStatement(updateVenueName).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, slug) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun venueCountByCity(): List { - return conn.prepareStatement(venueCountByCity).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(VenueCountByCityRow( - results.getString(1), - results.getLong(2) - )) - } - ret - } - } - -} - 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 deleted file mode 100644 index d0be9b8e61..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Models.kt +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.ondeck.postgresql - -import java.time.LocalDateTime - -// Venues can be either open or closed -enum class Status(val value: String) { - OPEN("op!en"), - CLOSED("clo@sed"); - - companion object { - private val map = Status.values().associateBy(Status::value) - fun lookup(value: String) = map[value] - } -} - -data class City ( - val slug: String, - val name: String -) - -// Venues are places where muisc happens -data class Venue ( - val id: Int, - val status: Status, - val statuses: List, - // This value appears in public URLs - val slug: String, - val name: String, - val city: String, - val spotifyPlaylist: String, - val songkickId: String?, - val tags: List, - val createdAt: LocalDateTime -) - 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 deleted file mode 100644 index ffd5759ba5..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/Queries.kt +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.ondeck.postgresql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.sql.Types -import java.time.LocalDateTime - -interface Queries { - @Throws(SQLException::class) - fun createCity(name: String, slug: String): City? - - @Throws(SQLException::class) - fun createVenue( - slug: String, - name: String, - city: String, - spotifyPlaylist: String, - status: Status, - statuses: List, - tags: List): Int? - - @Throws(SQLException::class) - fun deleteVenue(slug: String) - - @Throws(SQLException::class) - fun getCity(slug: String): City? - - @Throws(SQLException::class) - fun getVenue(slug: String, city: String): Venue? - - @Throws(SQLException::class) - fun listCities(): List - - @Throws(SQLException::class) - fun listVenues(city: String): List - - @Throws(SQLException::class) - fun updateCityName(name: String, slug: String) - - @Throws(SQLException::class) - fun updateVenueName(name: String, slug: String): Int? - - @Throws(SQLException::class) - fun venueCountByCity(): List - -} - 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 deleted file mode 100644 index fb927cf7a2..0000000000 --- a/examples/kotlin/src/main/kotlin/com/example/ondeck/postgresql/QueriesImpl.kt +++ /dev/null @@ -1,304 +0,0 @@ -// Code generated by sqlc. DO NOT EDIT. -// versions: -// sqlc v1.23.0 - -package com.example.ondeck.postgresql - -import java.sql.Connection -import java.sql.SQLException -import java.sql.Statement -import java.sql.Types -import java.time.LocalDateTime - -const val createCity = """-- name: createCity :one -INSERT INTO city ( - name, - slug -) VALUES ( - ?, - ? -) RETURNING slug, name -""" - -const val createVenue = """-- name: createVenue :one -INSERT INTO venue ( - slug, - name, - city, - created_at, - spotify_playlist, - status, - statuses, - tags -) VALUES ( - ?, - ?, - ?, - NOW(), - ?, - ?, - ?, - ? -) RETURNING id -""" - -const val deleteVenue = """-- name: deleteVenue :exec -DELETE FROM venue -WHERE slug = ? AND slug = ? -""" - -const val getCity = """-- name: getCity :one -SELECT slug, name -FROM city -WHERE slug = ? -""" - -const val getVenue = """-- name: getVenue :one -SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at -FROM venue -WHERE slug = ? AND city = ? -""" - -const val listCities = """-- name: listCities :many -SELECT slug, name -FROM city -ORDER BY name -""" - -const val listVenues = """-- name: listVenues :many -SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at -FROM venue -WHERE city = ? -ORDER BY name -""" - -const val updateCityName = """-- name: updateCityName :exec -UPDATE city -SET name = ? -WHERE slug = ? -""" - -const val updateVenueName = """-- name: updateVenueName :one -UPDATE venue -SET name = ? -WHERE slug = ? -RETURNING id -""" - -const val venueCountByCity = """-- name: venueCountByCity :many -SELECT - city, - count(*) -FROM venue -GROUP BY 1 -ORDER BY 1 -""" - -data class VenueCountByCityRow ( - val city: String, - val count: Long -) - -class QueriesImpl(private val conn: Connection) : Queries { - -// Create a new city. The slug must be unique. -// This is the second line of the comment -// This is the third line - - @Throws(SQLException::class) - override fun createCity(name: String, slug: String): City? { - return conn.prepareStatement(createCity).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, slug) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = City( - results.getString(1), - results.getString(2) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun createVenue( - slug: String, - name: String, - city: String, - spotifyPlaylist: String, - status: Status, - statuses: List, - tags: List): Int? { - return conn.prepareStatement(createVenue).use { stmt -> - stmt.setString(1, slug) - stmt.setString(2, name) - stmt.setString(3, city) - stmt.setString(4, spotifyPlaylist) - stmt.setObject(5, status.value, Types.OTHER) - stmt.setArray(6, conn.createArrayOf("status", statuses.map { v -> v.value }.toTypedArray())) - stmt.setArray(7, conn.createArrayOf("text", tags.toTypedArray())) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = results.getInt(1) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun deleteVenue(slug: String) { - conn.prepareStatement(deleteVenue).use { stmt -> - stmt.setString(1, slug) - stmt.setString(2, slug) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun getCity(slug: String): City? { - return conn.prepareStatement(getCity).use { stmt -> - stmt.setString(1, slug) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = City( - results.getString(1), - results.getString(2) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun getVenue(slug: String, city: String): Venue? { - return conn.prepareStatement(getVenue).use { stmt -> - stmt.setString(1, slug) - stmt.setString(2, city) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = Venue( - results.getInt(1), - Status.lookup(results.getString(2))!!, - (results.getArray(3).array as Array).map { v -> Status.lookup(v)!! }.toList(), - results.getString(4), - results.getString(5), - results.getString(6), - results.getString(7), - results.getString(8), - (results.getArray(9).array as Array).toList(), - results.getObject(10, LocalDateTime::class.java) - ) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun listCities(): List { - return conn.prepareStatement(listCities).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(City( - results.getString(1), - results.getString(2) - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun listVenues(city: String): List { - return conn.prepareStatement(listVenues).use { stmt -> - stmt.setString(1, city) - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(Venue( - results.getInt(1), - Status.lookup(results.getString(2))!!, - (results.getArray(3).array as Array).map { v -> Status.lookup(v)!! }.toList(), - results.getString(4), - results.getString(5), - results.getString(6), - results.getString(7), - results.getString(8), - (results.getArray(9).array as Array).toList(), - results.getObject(10, LocalDateTime::class.java) - )) - } - ret - } - } - - @Throws(SQLException::class) - override fun updateCityName(name: String, slug: String) { - conn.prepareStatement(updateCityName).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, slug) - - stmt.execute() - } - } - - @Throws(SQLException::class) - override fun updateVenueName(name: String, slug: String): Int? { - return conn.prepareStatement(updateVenueName).use { stmt -> - stmt.setString(1, name) - stmt.setString(2, slug) - - val results = stmt.executeQuery() - if (!results.next()) { - return null - } - val ret = results.getInt(1) - if (results.next()) { - throw SQLException("expected one row in result set, but got many") - } - ret - } - } - - @Throws(SQLException::class) - override fun venueCountByCity(): List { - return conn.prepareStatement(venueCountByCity).use { stmt -> - - val results = stmt.executeQuery() - val ret = mutableListOf() - while (results.next()) { - ret.add(VenueCountByCityRow( - results.getString(1), - results.getLong(2) - )) - } - ret - } - } - -} - diff --git a/examples/kotlin/src/main/resources/authors b/examples/kotlin/src/main/resources/authors deleted file mode 120000 index f391af0e5a..0000000000 --- a/examples/kotlin/src/main/resources/authors +++ /dev/null @@ -1 +0,0 @@ -../../../../authors \ No newline at end of file diff --git a/examples/kotlin/src/main/resources/booktest b/examples/kotlin/src/main/resources/booktest deleted file mode 120000 index a397d4ae21..0000000000 --- a/examples/kotlin/src/main/resources/booktest +++ /dev/null @@ -1 +0,0 @@ -../../../../booktest \ No newline at end of file diff --git a/examples/kotlin/src/main/resources/jets b/examples/kotlin/src/main/resources/jets deleted file mode 120000 index 24ed880a40..0000000000 --- a/examples/kotlin/src/main/resources/jets +++ /dev/null @@ -1 +0,0 @@ -../../../../jets \ No newline at end of file diff --git a/examples/kotlin/src/main/resources/ondeck b/examples/kotlin/src/main/resources/ondeck deleted file mode 120000 index 37517cb367..0000000000 --- a/examples/kotlin/src/main/resources/ondeck +++ /dev/null @@ -1 +0,0 @@ -../../../../ondeck \ No newline at end of file diff --git a/examples/kotlin/src/test/kotlin/com/example/authors/mysql/QueriesImplTest.kt b/examples/kotlin/src/test/kotlin/com/example/authors/mysql/QueriesImplTest.kt deleted file mode 100644 index 3cb7d7887d..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/authors/mysql/QueriesImplTest.kt +++ /dev/null @@ -1,65 +0,0 @@ -package com.example.authors.mysql - -import com.example.dbtest.MysqlDbTestExtension -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension - -class QueriesImplTest() { - - companion object { - @JvmField - @RegisterExtension - val dbtest = MysqlDbTestExtension("src/main/resources/authors/mysql/schema.sql") - } - - @Test - fun testCreateAuthor() { - val db = QueriesImpl(dbtest.getConnection()) - - val initialAuthors = db.listAuthors() - assert(initialAuthors.isEmpty()) - - val name = "Brian Kernighan" - val bio = "Co-author of The C Programming Language and The Go Programming Language" - val id = db.createAuthor( - name = name, - bio = bio - ) - assertEquals(id, 1) - val expectedAuthor = Author(id, name, bio) - - val fetchedAuthor = db.getAuthor(id) - assertEquals(expectedAuthor, fetchedAuthor) - - val listedAuthors = db.listAuthors() - assertEquals(1, listedAuthors.size) - assertEquals(expectedAuthor, listedAuthors[0]) - - val id2 = db.createAuthor( - name = name, - bio = bio - ) - assertEquals(id2, 2) - } - - @Test - fun testNull() { - val db = QueriesImpl(dbtest.getConnection()) - - val initialAuthors = db.listAuthors() - assert(initialAuthors.isEmpty()) - - val name = "Brian Kernighan" - val bio = null - val id = db.createAuthor(name, bio) - val expectedAuthor = Author(id, name, bio) - - val fetchedAuthor = db.getAuthor(id) - assertEquals(expectedAuthor, fetchedAuthor) - - val listedAuthors = db.listAuthors() - assertEquals(1, listedAuthors.size) - assertEquals(expectedAuthor, listedAuthors[0]) - } -} diff --git a/examples/kotlin/src/test/kotlin/com/example/authors/postgresql/QueriesImplTest.kt b/examples/kotlin/src/test/kotlin/com/example/authors/postgresql/QueriesImplTest.kt deleted file mode 100644 index 86c24fb68c..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/authors/postgresql/QueriesImplTest.kt +++ /dev/null @@ -1,60 +0,0 @@ -package com.example.authors.postgresql - -import com.example.dbtest.PostgresDbTestExtension -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension - -class QueriesImplTest() { - - companion object { - @JvmField - @RegisterExtension - val dbtest = PostgresDbTestExtension("src/main/resources/authors/postgresql/schema.sql") - } - - @Test - fun testCreateAuthor() { - val db = QueriesImpl(dbtest.getConnection()) - - val initialAuthors = db.listAuthors() - assert(initialAuthors.isEmpty()) - - val name = "Brian Kernighan" - val bio = "Co-author of The C Programming Language and The Go Programming Language" - val insertedAuthor = db.createAuthor( - name = name, - bio = bio - )!! - val expectedAuthor = Author(insertedAuthor.id, name, bio) - Assertions.assertEquals(expectedAuthor, insertedAuthor) - - val fetchedAuthor = db.getAuthor(insertedAuthor.id) - Assertions.assertEquals(expectedAuthor, fetchedAuthor) - - val listedAuthors = db.listAuthors() - Assertions.assertEquals(1, listedAuthors.size) - Assertions.assertEquals(expectedAuthor, listedAuthors[0]) - } - - @Test - fun testNull() { - val db = QueriesImpl(dbtest.getConnection()) - - val initialAuthors = db.listAuthors() - assert(initialAuthors.isEmpty()) - - val name = "Brian Kernighan" - val bio = null - val insertedAuthor = db.createAuthor(name, bio)!! - val expectedAuthor = Author(insertedAuthor.id, name, bio) - Assertions.assertEquals(expectedAuthor, insertedAuthor) - - val fetchedAuthor = db.getAuthor(insertedAuthor.id) - Assertions.assertEquals(expectedAuthor, fetchedAuthor) - - val listedAuthors = db.listAuthors() - Assertions.assertEquals(1, listedAuthors.size) - Assertions.assertEquals(expectedAuthor, listedAuthors[0]) - } -} \ No newline at end of file diff --git a/examples/kotlin/src/test/kotlin/com/example/booktest/mysql/QueriesImplTest.kt b/examples/kotlin/src/test/kotlin/com/example/booktest/mysql/QueriesImplTest.kt deleted file mode 100644 index f69cd85e12..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/booktest/mysql/QueriesImplTest.kt +++ /dev/null @@ -1,98 +0,0 @@ -package com.example.booktest.mysql - -import com.example.dbtest.MysqlDbTestExtension -import com.example.dbtest.PostgresDbTestExtension -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension -import java.time.LocalDateTime -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class QueriesImplTest { - companion object { - @JvmField @RegisterExtension val dbtest = MysqlDbTestExtension("src/main/resources/booktest/mysql/schema.sql") - } - - @Test - fun testQueries() { - val conn = dbtest.getConnection() - val db = QueriesImpl(conn) - val authorId = db.createAuthor("Unknown Master") - val author = db.getAuthor(authorId.toInt())!! - - // Start a transaction - conn.autoCommit = false - db.createBook( - authorId = author.authorId, - isbn = "1", - title = "my book title", - bookType = BooksBookType.NONFICTION, - yr = 2016, - available = LocalDateTime.now(), - tags = "" - ) - - val b1Id = db.createBook( - authorId = author.authorId, - isbn = "2", - title = "the second book", - bookType = BooksBookType.NONFICTION, - yr = 2016, - available = LocalDateTime.now(), - tags = listOf("cool", "unique").joinToString(",") - ) - - db.updateBook( - bookId = b1Id.toInt(), - title = "changed second title", - tags = listOf("cool", "disastor").joinToString(",") - ) - - val b3Id = db.createBook( - authorId = author.authorId, - isbn = "3", - title = "the third book", - bookType = BooksBookType.NONFICTION, - yr = 2001, - available = LocalDateTime.now(), - tags = listOf("cool").joinToString(",") - ) - - db.createBook( - authorId = author.authorId, - isbn = "4", - title = "4th place finisher", - bookType = BooksBookType.NONFICTION, - yr = 2011, - available = LocalDateTime.now(), - tags = listOf("other").joinToString(",") - ) - - // Commit transaction - conn.commit() - conn.autoCommit = true - - db.updateBookISBN( - bookId = b3Id.toInt(), - isbn = "NEW ISBN", - title = "never ever gonna finish, a quatrain", - tags = listOf("someother").joinToString(",") - ) - - val books0 = db.booksByTitleYear("my book title", 2016) - - val formatter = DateTimeFormatter.ISO_DATE_TIME - for (book in books0) { - println("Book ${book.bookId} (${book.bookType}): ${book.title} available: ${book.available.format(formatter)}") - val author2 = db.getAuthor(book.authorId)!! - println("Book ${book.bookId} author: ${author2.name}") - } - - // find a book with either "cool" or "other" tag - println("---------\\nTag search results:\\n") - val res = db.booksByTags(listOf("cool", "other", "someother").joinToString(",")) - for (ab in res) { - println("Book ${ab.bookId}: '${ab.title}', Author: '${ab.name}', ISBN: '${ab.isbn}' Tags: '${ab.tags.toList()}'") - } - } -} \ No newline at end of file diff --git a/examples/kotlin/src/test/kotlin/com/example/booktest/postgresql/QueriesImplTest.kt b/examples/kotlin/src/test/kotlin/com/example/booktest/postgresql/QueriesImplTest.kt deleted file mode 100644 index 1a4316123d..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/booktest/postgresql/QueriesImplTest.kt +++ /dev/null @@ -1,97 +0,0 @@ -package com.example.booktest.postgresql - -import com.example.dbtest.PostgresDbTestExtension -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class QueriesImplTest { - companion object { - @JvmField @RegisterExtension val dbtest = PostgresDbTestExtension("src/main/resources/booktest/postgresql/schema.sql") - } - - @Test - fun testQueries() { - val conn = dbtest.getConnection() - val db = QueriesImpl(conn) - val author = db.createAuthor("Unknown Master")!! - - // Start a transaction - conn.autoCommit = false - db.createBook( - authorId = author.authorId, - isbn = "1", - title = "my book title", - bookType = BookType.NONFICTION, - year = 2016, - available = OffsetDateTime.now(), - tags = listOf() - ) - - val b1 = db.createBook( - authorId = author.authorId, - isbn = "2", - title = "the second book", - bookType = BookType.NONFICTION, - year = 2016, - available = OffsetDateTime.now(), - tags = listOf("cool", "unique") - )!! - - db.updateBook( - bookId = b1.bookId, - title = "changed second title", - tags = listOf("cool", "disastor") - ) - - val b3 = db.createBook( - authorId = author.authorId, - isbn = "3", - title = "the third book", - bookType = BookType.NONFICTION, - year = 2001, - available = OffsetDateTime.now(), - tags = listOf("cool") - )!! - - db.createBook( - authorId = author.authorId, - isbn = "4", - title = "4th place finisher", - bookType = BookType.NONFICTION, - year = 2011, - available = OffsetDateTime.now(), - tags = listOf("other") - ) - - // Commit transaction - conn.commit() - conn.autoCommit = true - - // ISBN update fails because parameters are not in sequential order. After changing $N to ?, ordering is lost, - // and the parameters are filled into the wrong slots. - db.updateBookISBN( - bookId = b3.bookId, - isbn = "NEW ISBN", - title = "never ever gonna finish, a quatrain", - tags = listOf("someother") - ) - - val books0 = db.booksByTitleYear("my book title", 2016) - - val formatter = DateTimeFormatter.ISO_DATE_TIME - for (book in books0) { - println("Book ${book.bookId} (${book.bookType}): ${book.title} available: ${book.available.format(formatter)}") - val author2 = db.getAuthor(book.authorId)!! - println("Book ${book.bookId} author: ${author2.name}") - } - - // find a book with either "cool" or "other" tag - println("---------\\nTag search results:\\n") - val res = db.booksByTags(listOf("cool", "other", "someother")) - for (ab in res) { - println("Book ${ab.bookId}: '${ab.title}', Author: '${ab.name}', ISBN: '${ab.isbn}' Tags: '${ab.tags.toList()}'") - } - } -} \ No newline at end of file diff --git a/examples/kotlin/src/test/kotlin/com/example/dbtest/MysqlDbTestExtension.kt b/examples/kotlin/src/test/kotlin/com/example/dbtest/MysqlDbTestExtension.kt deleted file mode 100644 index 243a441476..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/dbtest/MysqlDbTestExtension.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.example.dbtest - -import org.junit.jupiter.api.extension.AfterEachCallback -import org.junit.jupiter.api.extension.BeforeEachCallback -import org.junit.jupiter.api.extension.ExtensionContext -import java.nio.file.Files -import java.nio.file.Paths -import java.sql.Connection -import java.sql.DriverManager -import kotlin.streams.toList - - -class MysqlDbTestExtension(private val migrationsPath: String) : BeforeEachCallback, AfterEachCallback { - val user = System.getenv("MYSQL_USER") ?: "root" - val pass = System.getenv("MYSQL_ROOT_PASSWORD") ?: "mysecretpassword" - val host = System.getenv("MYSQL_HOST") ?: "127.0.0.1" - val port = System.getenv("MYSQL_PORT") ?: "3306" - val mainDb = System.getenv("MYSQL_DATABASE") ?: "dinotest" - val testDb = "sqltest_mysql" - - override fun beforeEach(context: ExtensionContext) { - getConnection(mainDb).createStatement().execute("CREATE DATABASE $testDb") - val path = Paths.get(migrationsPath) - val migrations = if (Files.isDirectory(path)) { - Files.list(path).filter { it.toString().endsWith(".sql") }.sorted().map { Files.readString(it) }.toList() - } else { - listOf(Files.readString(path)) - } - migrations.forEach { - getConnection().createStatement().execute(it) - } - } - - override fun afterEach(context: ExtensionContext) { - getConnection(mainDb).createStatement().execute("DROP DATABASE $testDb") - } - - private fun getConnection(db: String): Connection { - val url = "jdbc:mysql://$host:$port/$db?user=$user&password=$pass&allowMultiQueries=true" - return DriverManager.getConnection(url) - } - - fun getConnection(): Connection { - return getConnection(testDb) - } -} \ No newline at end of file diff --git a/examples/kotlin/src/test/kotlin/com/example/dbtest/PostgresDbTestExtension.kt b/examples/kotlin/src/test/kotlin/com/example/dbtest/PostgresDbTestExtension.kt deleted file mode 100644 index 55a7d6f91d..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/dbtest/PostgresDbTestExtension.kt +++ /dev/null @@ -1,51 +0,0 @@ -package com.example.dbtest - -import org.junit.jupiter.api.extension.AfterEachCallback -import org.junit.jupiter.api.extension.BeforeEachCallback -import org.junit.jupiter.api.extension.ExtensionContext -import java.nio.file.Files -import java.nio.file.Paths -import java.sql.Connection -import java.sql.DriverManager -import kotlin.streams.toList - -class PostgresDbTestExtension(private val migrationsPath: String) : BeforeEachCallback, AfterEachCallback { - private val schemaConn: Connection - private val url: String - - companion object { - const val schema = "dinosql_test" - } - - init { - val user = System.getenv("PG_USER") ?: "postgres" - val pass = System.getenv("PG_PASSWORD") ?: "mysecretpassword" - val host = System.getenv("PG_HOST") ?: "127.0.0.1" - val port = System.getenv("PG_PORT") ?: "5432" - val db = System.getenv("PG_DATABASE") ?: "dinotest" - url = "jdbc:postgresql://$host:$port/$db?user=$user&password=$pass&sslmode=disable" - - schemaConn = DriverManager.getConnection(url) - } - - override fun beforeEach(context: ExtensionContext) { - schemaConn.createStatement().execute("CREATE SCHEMA $schema") - val path = Paths.get(migrationsPath) - val migrations = if (Files.isDirectory(path)) { - Files.list(path).filter{ it.toString().endsWith(".sql")}.sorted().map { Files.readString(it) }.toList() - } else { - listOf(Files.readString(path)) - } - migrations.forEach { - getConnection().createStatement().execute(it) - } - } - - override fun afterEach(context: ExtensionContext) { - schemaConn.createStatement().execute("DROP SCHEMA $schema CASCADE") - } - - fun getConnection(): Connection { - return DriverManager.getConnection("$url¤tSchema=$schema") - } -} \ No newline at end of file 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 deleted file mode 100644 index 27fac23535..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/ondeck/mysql/QueriesImplTest.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.example.ondeck.mysql - -import com.example.dbtest.MysqlDbTestExtension -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension - -class QueriesImplTest { - companion object { - @JvmField - @RegisterExtension - val dbtest = MysqlDbTestExtension("src/main/resources/ondeck/mysql/schema") - } - - @Test - fun testQueries() { - val q = QueriesImpl(dbtest.getConnection()) - q.createCity( - slug = "san-francisco", - name = "San Francisco" - ) - val city = q.listCities()[0] - val venueId = q.createVenue( - slug = "the-fillmore", - name = "The Fillmore", - city = city.slug, - spotifyPlaylist = "spotify=uri", - status = VenueStatus.OPEN, - statuses = listOf(VenueStatus.OPEN, VenueStatus.CLOSED).joinToString(","), - tags = listOf("rock", "punk").joinToString(",") - ) - val venue = q.getVenue( - slug = "the-fillmore", - city = city.slug - )!! - assertEquals(venueId, venue.id) - - assertEquals(city, q.getCity(city.slug)) - assertEquals(listOf(VenueCountByCityRow(city.slug, 1)), q.venueCountByCity()) - assertEquals(listOf(city), q.listCities()) - assertEquals(listOf(venue), q.listVenues(city.slug)) - - q.updateCityName(slug = city.slug, name = "SF") - q.updateVenueName(slug = venue.slug, name = "Fillmore") - val fresh = q.getVenue(venue.slug, city.slug)!! - assertEquals("Fillmore", fresh.name) - - q.deleteVenue(venue.slug, venue.slug) - } -} diff --git a/examples/kotlin/src/test/kotlin/com/example/ondeck/postgresql/QueriesImplTest.kt b/examples/kotlin/src/test/kotlin/com/example/ondeck/postgresql/QueriesImplTest.kt deleted file mode 100644 index 990f4398d1..0000000000 --- a/examples/kotlin/src/test/kotlin/com/example/ondeck/postgresql/QueriesImplTest.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.example.ondeck.postgresql - -import com.example.dbtest.PostgresDbTestExtension -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension - -class QueriesImplTest { - companion object { - @JvmField @RegisterExtension val dbtest = PostgresDbTestExtension("src/main/resources/ondeck/postgresql/schema") - } - - @Test - fun testQueries() { - val q = QueriesImpl(dbtest.getConnection()) - val city = q.createCity( - slug = "san-francisco", - name = "San Francisco" - )!! - val venueId = q.createVenue( - slug = "the-fillmore", - name = "The Fillmore", - city = city.slug, - spotifyPlaylist = "spotify=uri", - status = Status.OPEN, - statuses = listOf(Status.OPEN, Status.CLOSED), - tags = listOf("rock", "punk") - ) - val venue = q.getVenue( - slug = "the-fillmore", - city = city.slug - )!! - assertEquals(venueId, venue.id) - - assertEquals(city, q.getCity(city.slug)) - assertEquals(listOf(VenueCountByCityRow(city.slug, 1)), q.venueCountByCity()) - assertEquals(listOf(city), q.listCities()) - assertEquals(listOf(venue), q.listVenues(city.slug)) - - q.updateCityName(slug = city.slug, name = "SF") - val id = q.updateVenueName(slug = venue.slug, name = "Fillmore") - assertEquals(venue.id, id) - - q.deleteVenue(venue.slug) - } -} diff --git a/examples/ondeck/mysql/city.sql.go b/examples/ondeck/mysql/city.sql.go index d56edb59a0..b1476a1c44 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.23.0 +// sqlc v1.30.0 // source: city.sql package ondeck diff --git a/examples/ondeck/mysql/db.go b/examples/ondeck/mysql/db.go index 1b94a03985..273ff8b8cf 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/mysql/db_test.go b/examples/ondeck/mysql/db_test.go index a6ddecc18b..6ac70aaf06 100644 --- a/examples/ondeck/mysql/db_test.go +++ b/examples/ondeck/mysql/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package ondeck @@ -9,9 +8,10 @@ import ( "strings" "testing" - "github.com/sqlc-dev/sqlc/internal/sqltest" - + _ "github.com/go-sql-driver/mysql" "github.com/google/go-cmp/cmp" + + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func join(vals ...string) sql.NullString { @@ -143,10 +143,14 @@ func runOnDeckQueries(t *testing.T, q *Queries) { func TestPrepared(t *testing.T) { t.Parallel() - sdb, cleanup := sqltest.MySQL(t, []string{"schema"}) - defer cleanup() + uri := local.MySQL(t, []string{"schema"}) + db, err := sql.Open("mysql", uri) + if err != nil { + t.Fatalf("%s: %s", uri, err) + } + defer db.Close() - q, err := Prepare(context.Background(), sdb) + q, err := Prepare(context.Background(), db) if err != nil { t.Fatal(err) } @@ -157,8 +161,12 @@ func TestPrepared(t *testing.T) { func TestQueries(t *testing.T) { t.Parallel() - sdb, cleanup := sqltest.MySQL(t, []string{"schema"}) - defer cleanup() + uri := local.MySQL(t, []string{"schema"}) + db, err := sql.Open("mysql", uri) + if err != nil { + t.Fatalf("%s: %s", uri, err) + } + defer db.Close() - runOnDeckQueries(t, New(sdb)) + runOnDeckQueries(t, New(db)) } diff --git a/examples/ondeck/mysql/models.go b/examples/ondeck/mysql/models.go index a855643efd..aab664813c 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/mysql/querier.go b/examples/ondeck/mysql/querier.go index 5cc2dcef91..68b2ff51e8 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/mysql/schema/0001_city.sql b/examples/ondeck/mysql/schema/0001_city.sql index 6be35d16bf..94e9b0f8d4 100644 --- a/examples/ondeck/mysql/schema/0001_city.sql +++ b/examples/ondeck/mysql/schema/0001_city.sql @@ -1,4 +1,4 @@ CREATE TABLE city ( slug varchar(255) PRIMARY KEY, name text NOT NULL -) +); diff --git a/examples/ondeck/mysql/schema/0002_venue.sql b/examples/ondeck/mysql/schema/0002_venue.sql index 4fc842cee0..dcab205c96 100644 --- a/examples/ondeck/mysql/schema/0002_venue.sql +++ b/examples/ondeck/mysql/schema/0002_venue.sql @@ -5,7 +5,7 @@ CREATE TABLE venues ( statuses text, -- status[], slug text not null COMMENT 'This value appears in public URLs', name varchar(255) not null, - city text not null references city(slug), + city varchar(255) not null references city(slug), spotify_playlist varchar(255) not null, songkick_id text, tags text -- text[] diff --git a/examples/ondeck/mysql/venue.sql.go b/examples/ondeck/mysql/venue.sql.go index b17d6e5206..9d598b8116 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.23.0 +// sqlc v1.30.0 // source: venue.sql package ondeck diff --git a/examples/ondeck/postgresql/city.sql.go b/examples/ondeck/postgresql/city.sql.go index 72bd367955..306e76f643 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.23.0 +// sqlc v1.30.0 // source: city.sql package ondeck diff --git a/examples/ondeck/postgresql/db.go b/examples/ondeck/postgresql/db.go index 1b94a03985..273ff8b8cf 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/postgresql/db_test.go b/examples/ondeck/postgresql/db_test.go index c4e4ce8bbf..6d2fba6714 100644 --- a/examples/ondeck/postgresql/db_test.go +++ b/examples/ondeck/postgresql/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package ondeck @@ -11,7 +10,7 @@ import ( "github.com/google/go-cmp/cmp" _ "github.com/lib/pq" - "github.com/sqlc-dev/sqlc/internal/sqltest/hosted" + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func runOnDeckQueries(t *testing.T, q *Queries) { @@ -126,10 +125,10 @@ func runOnDeckQueries(t *testing.T, q *Queries) { func TestPrepared(t *testing.T) { t.Parallel() - uri := hosted.PostgreSQL(t, []string{"schema"}) + uri := local.PostgreSQL(t, []string{"schema"}) db, err := sql.Open("postgres", uri) if err != nil { - t.Fatal(err) + t.Fatalf("%s: %s", uri, err) } defer db.Close() @@ -144,10 +143,10 @@ func TestPrepared(t *testing.T) { func TestQueries(t *testing.T) { t.Parallel() - uri := hosted.PostgreSQL(t, []string{"schema"}) + uri := local.PostgreSQL(t, []string{"schema"}) db, err := sql.Open("postgres", uri) if err != nil { - t.Fatal(err) + t.Fatalf("%s: %s", uri, err) } defer db.Close() diff --git a/examples/ondeck/postgresql/models.go b/examples/ondeck/postgresql/models.go index d420279ce0..0b1e4ef06c 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/postgresql/querier.go b/examples/ondeck/postgresql/querier.go index bc36f2c81e..a6685141a2 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/postgresql/venue.sql.go b/examples/ondeck/postgresql/venue.sql.go index 467c63824a..e3134010ca 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.23.0 +// sqlc v1.30.0 // source: venue.sql package ondeck diff --git a/examples/ondeck/sqlc.json b/examples/ondeck/sqlc.json index 2e94b30d9b..7b97328b3f 100644 --- a/examples/ondeck/sqlc.json +++ b/examples/ondeck/sqlc.json @@ -12,7 +12,7 @@ "engine": "postgresql", "sql_package": "database/sql", "database": { - "managed": true + "uri": "${VET_TEST_EXAMPLES_POSTGRES_ONDECK}" }, "analyzer": { "database": false @@ -31,7 +31,7 @@ "queries": "mysql/query", "engine": "mysql", "database": { - "uri": "root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/ondeck?multiStatements=true&parseTime=true" + "uri": "${VET_TEST_EXAMPLES_MYSQL_ONDECK}" }, "rules": [ "sqlc/db-prepare" diff --git a/examples/ondeck/sqlite/city.sql.go b/examples/ondeck/sqlite/city.sql.go index d56edb59a0..b1476a1c44 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.23.0 +// sqlc v1.30.0 // source: city.sql package ondeck diff --git a/examples/ondeck/sqlite/db.go b/examples/ondeck/sqlite/db.go index 1b94a03985..273ff8b8cf 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/sqlite/db_test.go b/examples/ondeck/sqlite/db_test.go index f106256d45..e4bb4e4195 100644 --- a/examples/ondeck/sqlite/db_test.go +++ b/examples/ondeck/sqlite/db_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package ondeck @@ -150,6 +149,7 @@ func TestPrepared(t *testing.T) { t.Parallel() sdb, cleanup := sqltest.SQLite(t, []string{"schema"}) + defer sdb.Close() defer cleanup() q, err := Prepare(context.Background(), sdb) @@ -164,6 +164,7 @@ func TestQueries(t *testing.T) { t.Parallel() sdb, cleanup := sqltest.SQLite(t, []string{"schema"}) + defer sdb.Close() defer cleanup() runOnDeckQueries(t, New(sdb)) diff --git a/examples/ondeck/sqlite/models.go b/examples/ondeck/sqlite/models.go index de03d69d4b..215fde338f 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/sqlite/querier.go b/examples/ondeck/sqlite/querier.go index 5cc2dcef91..68b2ff51e8 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.23.0 +// sqlc v1.30.0 package ondeck diff --git a/examples/ondeck/sqlite/venue.sql.go b/examples/ondeck/sqlite/venue.sql.go index b2cef9f624..44f4f37705 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.23.0 +// sqlc v1.30.0 // source: venue.sql package ondeck diff --git a/examples/python/requirements.txt b/examples/python/requirements.txt deleted file mode 100644 index 26f645a169..0000000000 --- a/examples/python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pytest~=6.2.2 -pytest-asyncio~=0.14.0 -psycopg2-binary~=2.8.6 -asyncpg~=0.21.0 -sqlalchemy==1.4.0 diff --git a/examples/python/sqlc.json b/examples/python/sqlc.json deleted file mode 100644 index 29d3cc8464..0000000000 --- a/examples/python/sqlc.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "../authors/postgresql/schema.sql", - "queries": "../authors/postgresql/query.sql", - "engine": "postgresql", - "codegen": [ - { - "out": "src/authors", - "plugin": "py", - "options": { - "package": "authors", - "emit_sync_querier": true, - "emit_async_querier": true, - "query_parameter_limit": 5 - } - } - ] - }, - { - "schema": "../booktest/postgresql/schema.sql", - "queries": "../booktest/postgresql/query.sql", - "engine": "postgresql", - "codegen": [ - { - "out": "src/booktest", - "plugin": "py", - "options": { - "package": "booktest", - "emit_async_querier": true, - "query_parameter_limit": 5 - } - } - ] - }, - { - "schema": "../jets/postgresql/schema.sql", - "queries": "../jets/postgresql/query-building.sql", - "engine": "postgresql", - "codegen": [ - { - "out": "src/jets", - "plugin": "py", - "options": { - "package": "jets", - "emit_async_querier": true, - "query_parameter_limit": 5 - } - } - ] - }, - { - "schema": "../ondeck/postgresql/schema", - "queries": "../ondeck/postgresql/query", - "engine": "postgresql", - "codegen": [ - { - "out": "src/ondeck", - "plugin": "py", - "options": { - "package": "ondeck", - "emit_async_querier": true, - "query_parameter_limit": 5 - } - } - ] - } - ] -} diff --git a/examples/python/src/authors/models.py b/examples/python/src/authors/models.py deleted file mode 100644 index a8d25d0c34..0000000000 --- a/examples/python/src/authors/models.py +++ /dev/null @@ -1,12 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses -from typing import Optional - - -@dataclasses.dataclass() -class Author: - id: int - name: str - bio: Optional[str] diff --git a/examples/python/src/authors/query.py b/examples/python/src/authors/query.py deleted file mode 100644 index 58eccb90fa..0000000000 --- a/examples/python/src/authors/query.py +++ /dev/null @@ -1,112 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -from typing import AsyncIterator, Iterator, Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from authors import models - - -CREATE_AUTHOR = """-- name: create_author \\:one -INSERT INTO authors ( - name, bio -) VALUES ( - :p1, :p2 -) -RETURNING id, name, bio -""" - - -DELETE_AUTHOR = """-- name: delete_author \\:exec -DELETE FROM authors -WHERE id = :p1 -""" - - -GET_AUTHOR = """-- name: get_author \\:one -SELECT id, name, bio FROM authors -WHERE id = :p1 LIMIT 1 -""" - - -LIST_AUTHORS = """-- name: list_authors \\:many -SELECT id, name, bio FROM authors -ORDER BY name -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def create_author(self, *, name: str, bio: Optional[str]) -> Optional[models.Author]: - row = self._conn.execute(sqlalchemy.text(CREATE_AUTHOR), {"p1": name, "p2": bio}).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - def delete_author(self, *, id: int) -> None: - self._conn.execute(sqlalchemy.text(DELETE_AUTHOR), {"p1": id}) - - def get_author(self, *, id: int) -> Optional[models.Author]: - row = self._conn.execute(sqlalchemy.text(GET_AUTHOR), {"p1": id}).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - def list_authors(self) -> Iterator[models.Author]: - result = self._conn.execute(sqlalchemy.text(LIST_AUTHORS)) - for row in result: - yield models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def create_author(self, *, name: str, bio: Optional[str]) -> Optional[models.Author]: - row = (await self._conn.execute(sqlalchemy.text(CREATE_AUTHOR), {"p1": name, "p2": bio})).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - async def delete_author(self, *, id: int) -> None: - await self._conn.execute(sqlalchemy.text(DELETE_AUTHOR), {"p1": id}) - - async def get_author(self, *, id: int) -> Optional[models.Author]: - row = (await self._conn.execute(sqlalchemy.text(GET_AUTHOR), {"p1": id})).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - async def list_authors(self) -> AsyncIterator[models.Author]: - result = await self._conn.stream(sqlalchemy.text(LIST_AUTHORS)) - async for row in result: - yield models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) diff --git a/examples/python/src/booktest/models.py b/examples/python/src/booktest/models.py deleted file mode 100644 index 712f16663f..0000000000 --- a/examples/python/src/booktest/models.py +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses -import datetime -import enum -from typing import List - - -class BookType(str, enum.Enum): - FICTION = "FICTION" - NONFICTION = "NONFICTION" - - -@dataclasses.dataclass() -class Author: - author_id: int - name: str - - -@dataclasses.dataclass() -class Book: - book_id: int - author_id: int - isbn: str - book_type: BookType - title: str - year: int - available: datetime.datetime - tags: List[str] diff --git a/examples/python/src/booktest/query.py b/examples/python/src/booktest/query.py deleted file mode 100644 index 94b8565bc0..0000000000 --- a/examples/python/src/booktest/query.py +++ /dev/null @@ -1,211 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -import dataclasses -import datetime -from typing import AsyncIterator, List, Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from booktest import models - - -BOOKS_BY_TAGS = """-- name: books_by_tags \\:many -SELECT - book_id, - title, - name, - isbn, - tags -FROM books -LEFT JOIN authors ON books.author_id = authors.author_id -WHERE tags && :p1\\:\\:varchar[] -""" - - -@dataclasses.dataclass() -class BooksByTagsRow: - book_id: int - title: str - name: Optional[str] - isbn: str - tags: List[str] - - -BOOKS_BY_TITLE_YEAR = """-- name: books_by_title_year \\:many -SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books -WHERE title = :p1 AND year = :p2 -""" - - -CREATE_AUTHOR = """-- name: create_author \\:one -INSERT INTO authors (name) VALUES (:p1) -RETURNING author_id, name -""" - - -CREATE_BOOK = """-- name: create_book \\:one -INSERT INTO books ( - author_id, - isbn, - book_type, - title, - year, - available, - tags -) VALUES ( - :p1, - :p2, - :p3, - :p4, - :p5, - :p6, - :p7 -) -RETURNING book_id, author_id, isbn, book_type, title, year, available, tags -""" - - -@dataclasses.dataclass() -class CreateBookParams: - author_id: int - isbn: str - book_type: models.BookType - title: str - year: int - available: datetime.datetime - tags: List[str] - - -DELETE_BOOK = """-- name: delete_book \\:exec -DELETE FROM books -WHERE book_id = :p1 -""" - - -GET_AUTHOR = """-- name: get_author \\:one -SELECT author_id, name FROM authors -WHERE author_id = :p1 -""" - - -GET_BOOK = """-- name: get_book \\:one -SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books -WHERE book_id = :p1 -""" - - -UPDATE_BOOK = """-- name: update_book \\:exec -UPDATE books -SET title = :p1, tags = :p2 -WHERE book_id = :p3 -""" - - -UPDATE_BOOK_ISBN = """-- name: update_book_isbn \\:exec -UPDATE books -SET title = :p1, tags = :p2, isbn = :p4 -WHERE book_id = :p3 -""" - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def books_by_tags(self, *, dollar_1: List[str]) -> AsyncIterator[BooksByTagsRow]: - result = await self._conn.stream(sqlalchemy.text(BOOKS_BY_TAGS), {"p1": dollar_1}) - async for row in result: - yield BooksByTagsRow( - book_id=row[0], - title=row[1], - name=row[2], - isbn=row[3], - tags=row[4], - ) - - async def books_by_title_year(self, *, title: str, year: int) -> AsyncIterator[models.Book]: - result = await self._conn.stream(sqlalchemy.text(BOOKS_BY_TITLE_YEAR), {"p1": title, "p2": year}) - async for row in result: - yield models.Book( - book_id=row[0], - author_id=row[1], - isbn=row[2], - book_type=row[3], - title=row[4], - year=row[5], - available=row[6], - tags=row[7], - ) - - async def create_author(self, *, name: str) -> Optional[models.Author]: - row = (await self._conn.execute(sqlalchemy.text(CREATE_AUTHOR), {"p1": name})).first() - if row is None: - return None - return models.Author( - author_id=row[0], - name=row[1], - ) - - async def create_book(self, arg: CreateBookParams) -> Optional[models.Book]: - row = (await self._conn.execute(sqlalchemy.text(CREATE_BOOK), { - "p1": arg.author_id, - "p2": arg.isbn, - "p3": arg.book_type, - "p4": arg.title, - "p5": arg.year, - "p6": arg.available, - "p7": arg.tags, - })).first() - if row is None: - return None - return models.Book( - book_id=row[0], - author_id=row[1], - isbn=row[2], - book_type=row[3], - title=row[4], - year=row[5], - available=row[6], - tags=row[7], - ) - - async def delete_book(self, *, book_id: int) -> None: - await self._conn.execute(sqlalchemy.text(DELETE_BOOK), {"p1": book_id}) - - async def get_author(self, *, author_id: int) -> Optional[models.Author]: - row = (await self._conn.execute(sqlalchemy.text(GET_AUTHOR), {"p1": author_id})).first() - if row is None: - return None - return models.Author( - author_id=row[0], - name=row[1], - ) - - async def get_book(self, *, book_id: int) -> Optional[models.Book]: - row = (await self._conn.execute(sqlalchemy.text(GET_BOOK), {"p1": book_id})).first() - if row is None: - return None - return models.Book( - book_id=row[0], - author_id=row[1], - isbn=row[2], - book_type=row[3], - title=row[4], - year=row[5], - available=row[6], - tags=row[7], - ) - - async def update_book(self, *, title: str, tags: List[str], book_id: int) -> None: - await self._conn.execute(sqlalchemy.text(UPDATE_BOOK), {"p1": title, "p2": tags, "p3": book_id}) - - async def update_book_isbn(self, *, title: str, tags: List[str], book_id: int, isbn: str) -> None: - await self._conn.execute(sqlalchemy.text(UPDATE_BOOK_ISBN), { - "p1": title, - "p2": tags, - "p3": book_id, - "p4": isbn, - }) diff --git a/examples/python/src/dbtest/migrations.py b/examples/python/src/dbtest/migrations.py deleted file mode 100644 index 6ace6bcd63..0000000000 --- a/examples/python/src/dbtest/migrations.py +++ /dev/null @@ -1,43 +0,0 @@ -import os -from typing import List - -import sqlalchemy -import sqlalchemy.ext.asyncio - - -def apply_migrations(conn: sqlalchemy.engine.Connection, paths: List[str]): - files = _find_sql_files(paths) - - for file in files: - with open(file, "r") as fd: - blob = fd.read() - stmts = blob.split(";") - for stmt in stmts: - if stmt.strip(): - conn.execute(sqlalchemy.text(stmt)) - - -async def apply_migrations_async(conn: sqlalchemy.ext.asyncio.AsyncConnection, paths: List[str]): - files = _find_sql_files(paths) - - for file in files: - with open(file, "r") as fd: - blob = fd.read() - raw_conn = await conn.get_raw_connection() - # The asyncpg sqlalchemy adapter uses a prepared statement cache which can't handle the migration statements - await raw_conn._connection.execute(blob) - - -def _find_sql_files(paths: List[str]) -> List[str]: - files = [] - for path in paths: - if not os.path.exists(path): - raise FileNotFoundError(f"{path} does not exist") - if os.path.isdir(path): - for file in os.listdir(path): - if file.endswith(".sql"): - files.append(os.path.join(path, file)) - else: - files.append(path) - files.sort() - return files diff --git a/examples/python/src/jets/models.py b/examples/python/src/jets/models.py deleted file mode 100644 index 7d3063aba2..0000000000 --- a/examples/python/src/jets/models.py +++ /dev/null @@ -1,31 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Jet: - id: int - pilot_id: int - age: int - name: str - color: str - - -@dataclasses.dataclass() -class Language: - id: int - language: str - - -@dataclasses.dataclass() -class Pilot: - id: int - name: str - - -@dataclasses.dataclass() -class PilotLanguage: - pilot_id: int - language_id: int diff --git a/examples/python/src/jets/query-building.py b/examples/python/src/jets/query-building.py deleted file mode 100644 index 6fe42dfaa7..0000000000 --- a/examples/python/src/jets/query-building.py +++ /dev/null @@ -1,47 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query-building.sql -from typing import AsyncIterator, Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from jets import models - - -COUNT_PILOTS = """-- name: count_pilots \\:one -SELECT COUNT(*) FROM pilots -""" - - -DELETE_PILOT = """-- name: delete_pilot \\:exec -DELETE FROM pilots WHERE id = :p1 -""" - - -LIST_PILOTS = """-- name: list_pilots \\:many -SELECT id, name FROM pilots LIMIT 5 -""" - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def count_pilots(self) -> Optional[int]: - row = (await self._conn.execute(sqlalchemy.text(COUNT_PILOTS))).first() - if row is None: - return None - return row[0] - - async def delete_pilot(self, *, id: int) -> None: - await self._conn.execute(sqlalchemy.text(DELETE_PILOT), {"p1": id}) - - async def list_pilots(self) -> AsyncIterator[models.Pilot]: - result = await self._conn.stream(sqlalchemy.text(LIST_PILOTS)) - async for row in result: - yield models.Pilot( - id=row[0], - name=row[1], - ) diff --git a/examples/python/src/ondeck/city.py b/examples/python/src/ondeck/city.py deleted file mode 100644 index e32873eeb6..0000000000 --- a/examples/python/src/ondeck/city.py +++ /dev/null @@ -1,76 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: city.sql -from typing import AsyncIterator, Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from ondeck import models - - -CREATE_CITY = """-- name: create_city \\:one -INSERT INTO city ( - name, - slug -) VALUES ( - :p1, - :p2 -) RETURNING slug, name -""" - - -GET_CITY = """-- name: get_city \\:one -SELECT slug, name -FROM city -WHERE slug = :p1 -""" - - -LIST_CITIES = """-- name: list_cities \\:many -SELECT slug, name -FROM city -ORDER BY name -""" - - -UPDATE_CITY_NAME = """-- name: update_city_name \\:exec -UPDATE city -SET name = :p2 -WHERE slug = :p1 -""" - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def create_city(self, *, name: str, slug: str) -> Optional[models.City]: - row = (await self._conn.execute(sqlalchemy.text(CREATE_CITY), {"p1": name, "p2": slug})).first() - if row is None: - return None - return models.City( - slug=row[0], - name=row[1], - ) - - async def get_city(self, *, slug: str) -> Optional[models.City]: - row = (await self._conn.execute(sqlalchemy.text(GET_CITY), {"p1": slug})).first() - if row is None: - return None - return models.City( - slug=row[0], - name=row[1], - ) - - async def list_cities(self) -> AsyncIterator[models.City]: - result = await self._conn.stream(sqlalchemy.text(LIST_CITIES)) - async for row in result: - yield models.City( - slug=row[0], - name=row[1], - ) - - async def update_city_name(self, *, slug: str, name: str) -> None: - await self._conn.execute(sqlalchemy.text(UPDATE_CITY_NAME), {"p1": slug, "p2": name}) diff --git a/examples/python/src/ondeck/models.py b/examples/python/src/ondeck/models.py deleted file mode 100644 index 71c98c14ab..0000000000 --- a/examples/python/src/ondeck/models.py +++ /dev/null @@ -1,35 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses -import datetime -import enum -from typing import List, Optional - - -class Status(str, enum.Enum): - """Venues can be either open or closed""" - OPEN = "op!en" - CLOSED = "clo@sed" - - -@dataclasses.dataclass() -class City: - slug: str - name: str - - -@dataclasses.dataclass() -class Venue: - """Venues are places where muisc happens""" - id: int - status: Status - statuses: Optional[List[Status]] - # This value appears in public URLs - slug: str - name: str - city: str - spotify_playlist: str - songkick_id: Optional[str] - tags: Optional[List[str]] - created_at: datetime.datetime diff --git a/examples/python/src/ondeck/venue.py b/examples/python/src/ondeck/venue.py deleted file mode 100644 index 88e4a56467..0000000000 --- a/examples/python/src/ondeck/venue.py +++ /dev/null @@ -1,159 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: venue.sql -import dataclasses -from typing import AsyncIterator, List, Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from ondeck import models - - -CREATE_VENUE = """-- name: create_venue \\:one -INSERT INTO venue ( - slug, - name, - city, - created_at, - spotify_playlist, - status, - statuses, - tags -) VALUES ( - :p1, - :p2, - :p3, - NOW(), - :p4, - :p5, - :p6, - :p7 -) RETURNING id -""" - - -@dataclasses.dataclass() -class CreateVenueParams: - slug: str - name: str - city: str - spotify_playlist: str - status: models.Status - statuses: Optional[List[models.Status]] - tags: Optional[List[str]] - - -DELETE_VENUE = """-- name: delete_venue \\:exec -DELETE FROM venue -WHERE slug = :p1 AND slug = :p1 -""" - - -GET_VENUE = """-- name: get_venue \\:one -SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at -FROM venue -WHERE slug = :p1 AND city = :p2 -""" - - -LIST_VENUES = """-- name: list_venues \\:many -SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at -FROM venue -WHERE city = :p1 -ORDER BY name -""" - - -UPDATE_VENUE_NAME = """-- name: update_venue_name \\:one -UPDATE venue -SET name = :p2 -WHERE slug = :p1 -RETURNING id -""" - - -VENUE_COUNT_BY_CITY = """-- name: venue_count_by_city \\:many -SELECT - city, - count(*) -FROM venue -GROUP BY 1 -ORDER BY 1 -""" - - -@dataclasses.dataclass() -class VenueCountByCityRow: - city: str - count: int - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def create_venue(self, arg: CreateVenueParams) -> Optional[int]: - row = (await self._conn.execute(sqlalchemy.text(CREATE_VENUE), { - "p1": arg.slug, - "p2": arg.name, - "p3": arg.city, - "p4": arg.spotify_playlist, - "p5": arg.status, - "p6": arg.statuses, - "p7": arg.tags, - })).first() - if row is None: - return None - return row[0] - - async def delete_venue(self, *, slug: str) -> None: - await self._conn.execute(sqlalchemy.text(DELETE_VENUE), {"p1": slug}) - - async def get_venue(self, *, slug: str, city: str) -> Optional[models.Venue]: - row = (await self._conn.execute(sqlalchemy.text(GET_VENUE), {"p1": slug, "p2": city})).first() - if row is None: - return None - return models.Venue( - id=row[0], - status=row[1], - statuses=row[2], - slug=row[3], - name=row[4], - city=row[5], - spotify_playlist=row[6], - songkick_id=row[7], - tags=row[8], - created_at=row[9], - ) - - async def list_venues(self, *, city: str) -> AsyncIterator[models.Venue]: - result = await self._conn.stream(sqlalchemy.text(LIST_VENUES), {"p1": city}) - async for row in result: - yield models.Venue( - id=row[0], - status=row[1], - statuses=row[2], - slug=row[3], - name=row[4], - city=row[5], - spotify_playlist=row[6], - songkick_id=row[7], - tags=row[8], - created_at=row[9], - ) - - async def update_venue_name(self, *, slug: str, name: str) -> Optional[int]: - row = (await self._conn.execute(sqlalchemy.text(UPDATE_VENUE_NAME), {"p1": slug, "p2": name})).first() - if row is None: - return None - return row[0] - - async def venue_count_by_city(self) -> AsyncIterator[VenueCountByCityRow]: - result = await self._conn.stream(sqlalchemy.text(VENUE_COUNT_BY_CITY)) - async for row in result: - yield VenueCountByCityRow( - city=row[0], - count=row[1], - ) diff --git a/examples/python/src/tests/conftest.py b/examples/python/src/tests/conftest.py deleted file mode 100644 index f807209229..0000000000 --- a/examples/python/src/tests/conftest.py +++ /dev/null @@ -1,67 +0,0 @@ -import asyncio -import os -import random - -import pytest -import sqlalchemy -import sqlalchemy.ext.asyncio - - -@pytest.fixture(scope="session") -def postgres_uri() -> str: - pg_host = os.environ.get("PG_HOST", "postgres") - pg_port = os.environ.get("PG_PORT", 5432) - pg_user = os.environ.get("PG_USER", "postgres") - pg_password = os.environ.get("PG_PASSWORD", "mysecretpassword") - pg_db = os.environ.get("PG_DATABASE", "dinotest") - - return f"postgresql://{pg_user}:{pg_password}@{pg_host}:{pg_port}/{pg_db}" - - -@pytest.fixture(scope="session") -def sqlalchemy_connection(postgres_uri) -> sqlalchemy.engine.Connection: - engine = sqlalchemy.create_engine(postgres_uri, future=True) - with engine.connect() as conn: - yield conn - - -@pytest.fixture(scope="function") -def db(sqlalchemy_connection: sqlalchemy.engine.Connection) -> sqlalchemy.engine.Connection: - conn = sqlalchemy_connection - schema_name = f"sqltest_{random.randint(0, 1000)}" - conn.execute(sqlalchemy.text(f"CREATE SCHEMA {schema_name}")) - conn.execute(sqlalchemy.text(f"SET search_path TO {schema_name}")) - conn.commit() - yield conn - conn.rollback() - conn.execute(sqlalchemy.text(f"DROP SCHEMA {schema_name} CASCADE")) - conn.execute(sqlalchemy.text("SET search_path TO public")) - - -@pytest.fixture(scope="session") -async def async_sqlalchemy_connection(postgres_uri) -> sqlalchemy.ext.asyncio.AsyncConnection: - postgres_uri = postgres_uri.replace("postgresql", "postgresql+asyncpg") - engine = sqlalchemy.ext.asyncio.create_async_engine(postgres_uri) - async with engine.connect() as conn: - yield conn - - -@pytest.fixture(scope="function") -async def async_db(async_sqlalchemy_connection: sqlalchemy.ext.asyncio.AsyncConnection) -> sqlalchemy.ext.asyncio.AsyncConnection: - conn = async_sqlalchemy_connection - schema_name = f"sqltest_{random.randint(0, 1000)}" - await conn.execute(sqlalchemy.text(f"CREATE SCHEMA {schema_name}")) - await conn.execute(sqlalchemy.text(f"SET search_path TO {schema_name}")) - await conn.commit() - yield conn - await conn.rollback() - await conn.execute(sqlalchemy.text(f"DROP SCHEMA {schema_name} CASCADE")) - await conn.execute(sqlalchemy.text("SET search_path TO public")) - - -@pytest.fixture(scope="session") -def event_loop(): - """Change event_loop fixture to session level.""" - loop = asyncio.get_event_loop_policy().new_event_loop() - yield loop - loop.close() diff --git a/examples/python/src/tests/test_authors.py b/examples/python/src/tests/test_authors.py deleted file mode 100644 index 7b0a954276..0000000000 --- a/examples/python/src/tests/test_authors.py +++ /dev/null @@ -1,56 +0,0 @@ -import os - -import pytest -import sqlalchemy.ext.asyncio - -from authors import query -from dbtest.migrations import apply_migrations, apply_migrations_async - - -def test_authors(db: sqlalchemy.engine.Connection): - apply_migrations(db, [os.path.dirname(__file__) + "/../../../authors/postgresql/schema.sql"]) - - querier = query.Querier(db) - - authors = list(querier.list_authors()) - assert authors == [] - - author_name = "Brian Kernighan" - author_bio = "Co-author of The C Programming Language and The Go Programming Language" - new_author = querier.create_author(name=author_name, bio=author_bio) - assert new_author.id > 0 - assert new_author.name == author_name - assert new_author.bio == author_bio - - db_author = querier.get_author(id=new_author.id) - assert db_author == new_author - - author_list = list(querier.list_authors()) - assert len(author_list) == 1 - assert author_list[0] == new_author - - -@pytest.mark.asyncio -async def test_authors_async(async_db: sqlalchemy.ext.asyncio.AsyncConnection): - await apply_migrations_async(async_db, [os.path.dirname(__file__) + "/../../../authors/postgresql/schema.sql"]) - - querier = query.AsyncQuerier(async_db) - - async for _ in querier.list_authors(): - assert False, "No authors should exist" - - author_name = "Brian Kernighan" - author_bio = "Co-author of The C Programming Language and The Go Programming Language" - new_author = await querier.create_author(name=author_name, bio=author_bio) - assert new_author.id > 0 - assert new_author.name == author_name - assert new_author.bio == author_bio - - db_author = await querier.get_author(id=new_author.id) - assert db_author == new_author - - author_list = [] - async for author in querier.list_authors(): - author_list.append(author) - assert len(author_list) == 1 - assert author_list[0] == new_author diff --git a/examples/python/src/tests/test_booktest.py b/examples/python/src/tests/test_booktest.py deleted file mode 100644 index 6106d9d3fd..0000000000 --- a/examples/python/src/tests/test_booktest.py +++ /dev/null @@ -1,85 +0,0 @@ -import datetime -import os - -import pytest -import sqlalchemy.ext.asyncio - -from booktest import query, models -from dbtest.migrations import apply_migrations_async - - -@pytest.mark.asyncio -async def test_books(async_db: sqlalchemy.ext.asyncio.AsyncConnection): - await apply_migrations_async(async_db, [os.path.dirname(__file__) + "/../../../booktest/postgresql/schema.sql"]) - - querier = query.AsyncQuerier(async_db) - - author = await querier.create_author(name="Unknown Master") - assert author is not None - - now = datetime.datetime.now() - await querier.create_book(query.CreateBookParams( - author_id=author.author_id, - isbn="1", - title="my book title", - book_type=models.BookType.FICTION, - year=2016, - available=now, - tags=[], - )) - - b1 = await querier.create_book(query.CreateBookParams( - author_id=author.author_id, - isbn="2", - title="the second book", - book_type=models.BookType.FICTION, - year=2016, - available=now, - tags=["cool", "unique"], - )) - - await querier.update_book(book_id=b1.book_id, title="changed second title", tags=["cool", "disastor"]) - - b3 = await querier.create_book(query.CreateBookParams( - author_id=author.author_id, - isbn="3", - title="the third book", - book_type=models.BookType.FICTION, - year=2001, - available=now, - tags=["cool"], - )) - - b4 = await querier.create_book(query.CreateBookParams( - author_id=author.author_id, - isbn="4", - title="4th place finisher", - book_type=models.BookType.NONFICTION, - year=2011, - available=now, - tags=["other"], - )) - - await querier.update_book_isbn(book_id=b4.book_id, isbn="NEW ISBN", title="never ever gonna finish, a quatrain", tags=["someother"]) - - books0 = querier.books_by_title_year(title="my book title", year=2016) - expected_titles = {"my book title"} - async for book in books0: - expected_titles.remove(book.title) # raises a key error if the title does not exist - assert len(book.tags) == 0 - - author = await querier.get_author(author_id=book.author_id) - assert author.name == "Unknown Master" - assert len(expected_titles) == 0 - - books = querier.books_by_tags(dollar_1=["cool", "other", "someother"]) - expected_titles = {"changed second title", "the third book", "never ever gonna finish, a quatrain"} - async for book in books: - expected_titles.remove(book.title) - assert len(expected_titles) == 0 - - b5 = await querier.get_book(book_id=b3.book_id) - assert b5 is not None - await querier.delete_book(book_id=b5.book_id) - b6 = await querier.get_book(book_id=b5.book_id) - assert b6 is None diff --git a/examples/python/src/tests/test_ondeck.py b/examples/python/src/tests/test_ondeck.py deleted file mode 100644 index 68cfbc9bcb..0000000000 --- a/examples/python/src/tests/test_ondeck.py +++ /dev/null @@ -1,53 +0,0 @@ -import os - -import pytest -import sqlalchemy.ext.asyncio - -from ondeck import models -from ondeck import city as city_queries -from ondeck import venue as venue_queries -from dbtest.migrations import apply_migrations_async - - -@pytest.mark.asyncio -async def test_ondeck(async_db: sqlalchemy.ext.asyncio.AsyncConnection): - await apply_migrations_async(async_db, [os.path.dirname(__file__) + "/../../../ondeck/postgresql/schema"]) - - city_querier = city_queries.AsyncQuerier(async_db) - venue_querier = venue_queries.AsyncQuerier(async_db) - - city = await city_querier.create_city(slug="san-francisco", name="San Francisco") - assert city is not None - - venue_id = await venue_querier.create_venue(venue_queries.CreateVenueParams( - slug="the-fillmore", - name="The Fillmore", - city=city.slug, - spotify_playlist="spotify:uri", - status=models.Status.OPEN, - statuses=[models.Status.OPEN, models.Status.CLOSED], - tags=["rock", "punk"], - )) - assert venue_id is not None - - venue = await venue_querier.get_venue(slug="the-fillmore", city=city.slug) - assert venue is not None - assert venue.id == venue_id - - assert city == await city_querier.get_city(slug=city.slug) - assert [venue_queries.VenueCountByCityRow(city=city.slug, count=1)] == await _to_list(venue_querier.venue_count_by_city()) - assert [city] == await _to_list(city_querier.list_cities()) - assert [venue] == await _to_list(venue_querier.list_venues(city=city.slug)) - - await city_querier.update_city_name(slug=city.slug, name="SF") - _id = await venue_querier.update_venue_name(slug=venue.slug, name="Fillmore") - assert _id == venue_id - - await venue_querier.delete_venue(slug=venue.slug) - - -async def _to_list(it): - out = [] - async for i in it: - out.append(i) - return out diff --git a/go.mod b/go.mod index 06b9f4f090..15fa4714b0 100644 --- a/go.mod +++ b/go.mod @@ -1,66 +1,73 @@ module github.com/sqlc-dev/sqlc -go 1.21 +go 1.23.0 + +toolchain go1.24.1 require ( - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1 - github.com/bytecodealliance/wasmtime-go/v14 v14.0.0 + github.com/antlr4-go/antlr/v4 v4.13.1 github.com/cubicdaiya/gonp v1.0.4 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.6.0 - github.com/jackc/pgx/v4 v4.18.1 - github.com/jackc/pgx/v5 v5.4.3 + github.com/fatih/structtag v1.2.0 + github.com/go-sql-driver/mysql v1.9.3 + github.com/google/cel-go v0.26.1 + github.com/google/go-cmp v0.7.0 + github.com/jackc/pgx/v4 v4.18.3 + github.com/jackc/pgx/v5 v5.7.5 github.com/jinzhu/inflection v1.0.0 github.com/lib/pq v1.10.9 - github.com/mattn/go-sqlite3 v1.14.17 - github.com/pganalyze/pg_query_go/v4 v4.2.3 + github.com/pganalyze/pg_query_go/v6 v6.1.0 + github.com/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0 github.com/riza-io/grpc-go v0.2.0 - github.com/spf13/cobra v1.7.0 - github.com/spf13/pflag v1.0.5 + github.com/spf13/cobra v1.10.1 + github.com/spf13/pflag v1.0.9 + github.com/tetratelabs/wazero v1.9.0 + github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/sync v0.4.0 - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + golang.org/x/sync v0.16.0 + google.golang.org/grpc v1.75.0 + google.golang.org/protobuf v1.36.8 gopkg.in/yaml.v3 v3.0.1 + modernc.org/sqlite v1.38.2 ) 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-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect -) - -require ( - github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect - github.com/fatih/structtag v1.2.0 - github.com/golang/protobuf v1.5.3 // indirect + cel.dev/expr v0.24.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect 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/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgtype v1.14.0 // indirect - github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/ncruces/go-strftime v0.1.9 // indirect + github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb // indirect + github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 // indirect github.com/pingcap/log v1.1.0 // indirect - 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 + github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect 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.14.0 // indirect - golang.org/x/exp v0.0.0-20230724220655-d98519c11495 // 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 + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.39.0 // indirect + golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect + golang.org/x/net v0.41.0 // indirect + golang.org/x/sys v0.34.0 // indirect + golang.org/x/text v0.26.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + modernc.org/libc v1.66.3 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect ) diff --git a/go.sum b/go.sum index 4870a46943..6785dac9a3 100644 --- a/go.sum +++ b/go.sum @@ -1,53 +1,51 @@ +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1 h1:X8MJ0fnN5FPdcGF5Ij2/OW+HgiJrRg3AfHAx1PJtIzM= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= 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/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= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cubicdaiya/gonp v1.0.4 h1:ky2uIAJh81WiLcGKBVD5R7KsM/36W6IqqTy6Bo6rGws= github.com/cubicdaiya/gonp v1.0.4/go.mod h1:iWGuP/7+JVTn02OWhRemVbMmG1DOUnmrGTYYACpOI0I= -github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso= -github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= +github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/cel-go v0.18.1 h1:V/lAXKq4C3BYLDy/ARzMtpkEEYfHQpZzVyzy69nEUjs= -github.com/google/cel-go v0.18.1/go.mod h1:PVAybmSnWkNMUZR/tEWFUiJ1Np4Hz0MHsZJcgC4zln4= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -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/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= @@ -60,9 +58,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= -github.com/jackc/pgconn v1.14.1 h1:smbxIaZA08n6YuxEX1sDyjV/qkbtUtkH20qLkR9MUR4= -github.com/jackc/pgconn v1.14.1/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -78,11 +75,11 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= -github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= 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/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/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= @@ -93,16 +90,15 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= -github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= -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/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA= +github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= +github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs= +github.com/jackc/pgx/v5 v5.7.5/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= 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/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/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/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= @@ -127,20 +123,21 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= -github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/pganalyze/pg_query_go/v4 v4.2.3 h1:cNLqyiVMasV7YGWyYV+fkXyHp32gDfXVNCqoHztEGNk= -github.com/pganalyze/pg_query_go/v4 v4.2.3/go.mod h1:aEkDNOXNM5j0YGzaAapwJ7LB3dLNj+bvbWcLv1hOVqA= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/pganalyze/pg_query_go/v6 v6.1.0 h1:jG5ZLhcVgL1FAw4C/0VNQaVmX1SUJx71wBGdtTtBvls= +github.com/pganalyze/pg_query_go/v6 v6.1.0/go.mod h1:nvTHIuoud6e1SfrUaFwHqT0i4b5Nr+1rPWVds3B5+50= github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 h1:+FZIDR/D97YOPik4N4lPDaUcLDF/EQPogxtlHB2ZZRM= -github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= -github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c h1:CgbKAHto5CQgWM9fSBIvaxsJHuGP0uM74HXtv3MyyGQ= -github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= +github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb h1:3pSi4EDG6hg0orE1ndHkXvX6Qdq2cZn8gAPir8ymKZk= +github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= +github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 h1:tdMsjOqUR7YXHoBitzdebTvOjs/swniBTOLy5XiMtuE= +github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86/go.mod h1:exzhVYca3WRtd6gclGNErRWb1qEgff3LYta0LvRmON4= 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-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/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0 h1:W3rpAI3bubR6VWOcwxDIG0Gz9G5rl5b3SL116T0vBt0= +github.com/pingcap/tidb/pkg/parser v0.0.0-20250324122243-d51e00e5bbf0/go.mod h1:+8feuexTKcXHZF/dkDfvCwEyBAmgb4paFc3/WeYV2eE= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -158,41 +155,52 @@ github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OK github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= +github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I= +github.com/tetratelabs/wazero v1.9.0/go.mod h1:TSbcXCfFP0L2FGkRPxHphadXPjo1T6W+CseNNY7EkjM= +github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07 h1:mJdDDPblDfPe7z7go8Dvv1AJQDI3eQ/5xith3q2mFlo= +github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07/go.mod h1:Ak17IJ037caFp4jpCw/iQQ7/W74Sqpb1YuKJU6HTKfM= +github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 h1:OvLBa8SqJnZ6P+mjlzc2K7PM22rRUPE1x32G9DTPrC4= +github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52/go.mod h1:jMeV4Vpbi8osrE/pKUxRZkVaA0EX7NZN0A9/oRzgpgY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -202,8 +210,8 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -216,8 +224,8 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -227,29 +235,25 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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.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/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= 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/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= 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= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 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= @@ -262,24 +266,18 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -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.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 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= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= 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= @@ -288,34 +286,29 @@ golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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-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= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= 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/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -324,10 +317,35 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/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.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +modernc.org/cc/v4 v4.26.2 h1:991HMkLjJzYBIfha6ECZdjrIYz2/1ayr+FL8GN+CNzM= +modernc.org/cc/v4 v4.26.2/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU= +modernc.org/ccgo/v4 v4.28.0/go.mod h1:JygV3+9AV6SmPhDasu4JgquwU81XAKLd3OKTUDNOiKE= +modernc.org/fileutil v1.3.8 h1:qtzNm7ED75pd1C7WgAGcK4edm4fvhtBsEiI/0NQ54YM= +modernc.org/fileutil v1.3.8/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/libc v1.66.3 h1:cfCbjTUcdsKyyZZfEUKfoHcP3S0Wkvz3jgSzByEWVCQ= +modernc.org/libc v1.66.3/go.mod h1:XD9zO8kt59cANKvHPXpx7yS2ELPheAey0vjIuZOhOU8= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= +modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.38.2 h1:Aclu7+tgjgcQVShZqim41Bbw9Cho0y/7WzYptXqkEek= +modernc.org/sqlite v1.38.2/go.mod h1:cPTJYSlgg3Sfg046yBShXENNtPrWrDX8bsbAQBzgQ5E= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/internal/analyzer/analyzer.go b/internal/analyzer/analyzer.go index 85ae587b6e..3d7e3a0287 100644 --- a/internal/analyzer/analyzer.go +++ b/internal/analyzer/analyzer.go @@ -48,7 +48,7 @@ func (c *CachedAnalyzer) Analyze(ctx context.Context, n ast.Node, q string, sche } 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 + // Only cache queries for managed databases. We can't be certain the // database is in an unchanged state otherwise if !c.db.Managed { return nil, true, nil diff --git a/internal/bundler/multipart.go b/internal/bundler/multipart.go index 1336c1a559..b1d1925fde 100644 --- a/internal/bundler/multipart.go +++ b/internal/bundler/multipart.go @@ -4,52 +4,37 @@ import ( "os" "path/filepath" - "github.com/sqlc-dev/sqlc/internal/config" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) -func readInputs(file string, conf *config.Config) ([]*pb.File, error) { - refs := map[string]struct{}{} - refs[filepath.Base(file)] = struct{}{} - - for _, pkg := range conf.SQL { - for _, paths := range []config.Paths{pkg.Schema, pkg.Queries} { - files, err := sqlpath.Glob(paths) - if err != nil { - return nil, err - } - for _, file := range files { - refs[file] = struct{}{} - } - } +func readFiles(dir string, paths []string) ([]*pb.File, error) { + files, err := sqlpath.Glob(paths) + if err != nil { + return nil, err } - - var files []*pb.File - for file, _ := range refs { - contents, err := os.ReadFile(file) + var out []*pb.File + for _, file := range files { + f, err := readFile(dir, file) if err != nil { return nil, err } - files = append(files, &pb.File{ - Name: file, - Contents: contents, - }) + out = append(out, f) } - return files, nil + return out, nil } -func readOutputs(dir string, output map[string]string) ([]*pb.File, error) { - var files []*pb.File - for filename, contents := range output { - rel, err := filepath.Rel(dir, filename) - if err != nil { - return nil, err - } - files = append(files, &pb.File{ - Name: rel, - Contents: []byte(contents), - }) +func readFile(dir string, path string) (*pb.File, error) { + rel, err := filepath.Rel(dir, path) + if err != nil { + return nil, err + } + blob, err := os.ReadFile(path) + if err != nil { + return nil, err } - return files, nil + return &pb.File{ + Name: rel, + Contents: blob, + }, nil } diff --git a/internal/bundler/upload.go b/internal/bundler/upload.go index e60d7dfe08..49e3b44a4c 100644 --- a/internal/bundler/upload.go +++ b/internal/bundler/upload.go @@ -4,11 +4,15 @@ import ( "context" "errors" "fmt" + "log/slog" + "os" + "strings" - "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/info" + "github.com/sqlc-dev/sqlc/internal/plugin" "github.com/sqlc-dev/sqlc/internal/quickdb" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" ) @@ -33,6 +37,13 @@ type Uploader struct { client pb.QuickClient } +type QuerySetArchive struct { + Name string + Queries []string + Schema []string + Request *plugin.GenerateRequest +} + func NewUploader(configPath, dir string, conf *config.Config) *Uploader { return &Uploader{ configPath: configPath, @@ -58,36 +69,91 @@ func (up *Uploader) Validate() error { return nil } -func (up *Uploader) buildRequest(ctx context.Context, result map[string]string) (*pb.UploadArchiveRequest, error) { - ins, err := readInputs(up.configPath, up.config) - if err != nil { - return nil, err +var envvars = []string{ + "GITHUB_REPOSITORY", + "GITHUB_REF", + "GITHUB_REF_NAME", + "GITHUB_REF_TYPE", + "GITHUB_SHA", +} + +func annotate() map[string]string { + labels := map[string]string{} + for _, ev := range envvars { + key := strings.ReplaceAll(strings.ToLower(ev), "_", ".") + labels[key] = os.Getenv(ev) } - outs, err := readOutputs(up.dir, result) + return labels +} + +func BuildRequest(ctx context.Context, dir, configPath string, results []*QuerySetArchive, tags []string) (*pb.UploadArchiveRequest, error) { + conf, err := readFile(dir, configPath) if err != nil { return nil, err } - return &pb.UploadArchiveRequest{ + res := &pb.UploadArchiveRequest{ SqlcVersion: info.Version, - Inputs: ins, - Outputs: outs, - }, nil + Config: conf, + Tags: tags, + Annotations: annotate(), + } + for i, result := range results { + schema, err := readFiles(dir, result.Schema) + if err != nil { + return nil, err + } + queries, err := readFiles(dir, result.Queries) + if err != nil { + return nil, err + } + name := result.Name + if name == "" { + name = fmt.Sprintf("queryset_%d", i) + } + genreq, err := proto.Marshal(result.Request) + if err != nil { + return nil, err + } + res.QuerySets = append(res.QuerySets, &pb.QuerySet{ + Name: name, + Schema: schema, + Queries: queries, + CodegenRequest: &pb.File{ + Name: "codegen_request.pb", + Contents: genreq, + }, + }) + } + return res, nil } -func (up *Uploader) DumpRequestOut(ctx context.Context, result map[string]string) error { - req, err := up.buildRequest(ctx, result) +func (up *Uploader) buildRequest(ctx context.Context, results []*QuerySetArchive, tags []string) (*pb.UploadArchiveRequest, error) { + return BuildRequest(ctx, up.dir, up.configPath, results, tags) +} + +func (up *Uploader) DumpRequestOut(ctx context.Context, result []*QuerySetArchive) error { + req, err := up.buildRequest(ctx, result, []string{}) if err != nil { return err } - fmt.Println(protojson.Format(req)) + slog.Info("config", "file", req.Config.Name, "bytes", len(req.Config.Contents)) + for _, qs := range req.QuerySets { + slog.Info("codegen_request", "queryset", qs.Name, "file", "codegen_request.pb") + for _, file := range qs.Schema { + slog.Info("schema", "queryset", qs.Name, "file", file.Name, "bytes", len(file.Contents)) + } + for _, file := range qs.Queries { + slog.Info("query", "queryset", qs.Name, "file", file.Name, "bytes", len(file.Contents)) + } + } return nil } -func (up *Uploader) Upload(ctx context.Context, result map[string]string) error { +func (up *Uploader) Upload(ctx context.Context, result []*QuerySetArchive, tags []string) error { if err := up.Validate(); err != nil { return err } - req, err := up.buildRequest(ctx, result) + req, err := up.buildRequest(ctx, result, tags) if err != nil { return err } diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 9a6584b522..93fd6bbeaa 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -26,7 +26,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)") + pushCmd.Flags().BoolP("dry-run", "", false, "dump push request (default: false)") initCmd.Flags().BoolP("v1", "", false, "generate v1 config yaml file") initCmd.Flags().BoolP("v2", "", true, "generate v2 config yaml file") initCmd.MarkFlagsMutuallyExclusive("v1", "v2") @@ -36,7 +36,6 @@ func init() { func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int { rootCmd := &cobra.Command{Use: "sqlc", SilenceUsage: true} rootCmd.PersistentFlags().StringP("file", "f", "", "specify an alternate config file (default: sqlc.yaml)") - 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)") @@ -46,7 +45,8 @@ func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int rootCmd.AddCommand(genCmd) rootCmd.AddCommand(initCmd) rootCmd.AddCommand(versionCmd) - rootCmd.AddCommand(uploadCmd) + rootCmd.AddCommand(verifyCmd) + rootCmd.AddCommand(pushCmd) rootCmd.AddCommand(NewCmdVet()) rootCmd.SetArgs(args) @@ -149,7 +149,7 @@ func ParseEnv(c *cobra.Command) Env { return Env{ DryRun: dr != nil && dr.Changed, Debug: opts.DebugFromEnv(), - Remote: r != nil && nr.Value.String() == "true", + Remote: r != nil && r.Value.String() == "true", NoRemote: nr != nil && nr.Value.String() == "true", } } @@ -190,7 +190,7 @@ func getConfigPath(stderr io.Writer, f *pflag.Flag) (string, string) { var genCmd = &cobra.Command{ Use: "generate", - Short: "Generate Go code from SQL", + Short: "Generate source code from SQL", RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "generate").End() stderr := cmd.ErrOrStderr() @@ -214,24 +214,6 @@ var genCmd = &cobra.Command{ }, } -var uploadCmd = &cobra.Command{ - Use: "upload", - Short: "Upload the schema, queries, and configuration for this project", - RunE: func(cmd *cobra.Command, args []string) error { - stderr := cmd.ErrOrStderr() - dir, name := getConfigPath(stderr, cmd.Flag("file")) - 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) - } - return nil - }, -} - var checkCmd = &cobra.Command{ Use: "compile", Short: "Statically check SQL for syntax and type errors", diff --git a/internal/cmd/createdb.go b/internal/cmd/createdb.go index 8eb3d26222..02b3031352 100644 --- a/internal/cmd/createdb.go +++ b/internal/cmd/createdb.go @@ -5,12 +5,12 @@ import ( "fmt" "os" "runtime/trace" + "time" "github.com/spf13/cobra" "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/dbmanager" "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" ) @@ -65,8 +65,14 @@ func CreateDB(ctx context.Context, dir, filename, querySetName string, o *Option 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") + + switch queryset.Engine { + case config.EngineMySQL: + // pass + case config.EnginePostgreSQL: + // pass + default: + return fmt.Errorf("createdb does not support the %s engine", queryset.Engine) } var ddl []string @@ -82,20 +88,16 @@ func CreateDB(ctx context.Context, dir, filename, querySetName string, o *Option 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(), + now := time.Now().UTC().UnixNano() + client := dbmanager.NewClient(conf.Servers) + resp, err := client.CreateDatabase(ctx, &dbmanager.CreateDatabaseRequest{ + Engine: string(queryset.Engine), Migrations: ddl, + Prefix: fmt.Sprintf("sqlc_createdb_%d", now), }) 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/cmd/generate.go b/internal/cmd/generate.go index 35a5f06e4e..00e8871c7e 100644 --- a/internal/cmd/generate.go +++ b/internal/cmd/generate.go @@ -1,7 +1,6 @@ package cmd import ( - "bytes" "context" "encoding/json" "errors" @@ -9,11 +8,11 @@ import ( "io" "os" "path/filepath" - "runtime" "runtime/trace" + "strings" "sync" - "golang.org/x/sync/errgroup" + "google.golang.org/grpc" "google.golang.org/grpc/status" "github.com/sqlc-dev/sqlc/internal/codegen/golang" @@ -56,13 +55,6 @@ func printFileErr(stderr io.Writer, dir string, fileErr *multierr.FileError) { fmt.Fprintf(stderr, "%s:%d:%d: %s\n", filename, fileErr.Line, fileErr.Column, fileErr.Err) } -type outPair struct { - Gen config.SQLGen - Plugin *config.Codegen - - config.SQL -} - func findPlugin(conf config.Config, name string) (*config.Plugin, error) { for _, plug := range conf.Plugins { if plug.Name == name { @@ -159,126 +151,83 @@ func Generate(ctx context.Context, dir, filename string, o *Options) (map[string return nil, err } + // Comment on why these two methods exist if conf.Cloud.Project != "" && e.Remote && !e.NoRemote { return remoteGenerate(ctx, configPath, conf, dir, stderr) } - output := map[string]string{} - errored := false + g := &generator{ + dir: dir, + output: map[string]string{}, + } + + if err := processQuerySets(ctx, g, conf, dir, o); err != nil { + return nil, err + } + + return g.output, nil +} - var pairs []outPair +type generator struct { + m sync.Mutex + dir string + output map[string]string +} + +func (g *generator) Pairs(ctx context.Context, conf *config.Config) []OutputPair { + var pairs []OutputPair for _, sql := range conf.SQL { if sql.Gen.Go != nil { - pairs = append(pairs, outPair{ + pairs = append(pairs, OutputPair{ SQL: sql, Gen: config.SQLGen{Go: sql.Gen.Go}, }) } if sql.Gen.JSON != nil { - pairs = append(pairs, outPair{ + pairs = append(pairs, OutputPair{ SQL: sql, Gen: config.SQLGen{JSON: sql.Gen.JSON}, }) } for i := range sql.Codegen { - pairs = append(pairs, outPair{ + pairs = append(pairs, OutputPair{ SQL: sql, Plugin: &sql.Codegen[i], }) } } + return pairs +} - var m sync.Mutex - grp, gctx := errgroup.WithContext(ctx) - grp.SetLimit(runtime.GOMAXPROCS(0)) - - stderrs := make([]bytes.Buffer, len(pairs)) - - for i, pair := range pairs { - sql := pair - errout := &stderrs[i] - - grp.Go(func() error { - combo := config.Combine(*conf, sql.SQL) - if sql.Plugin != nil { - combo.Codegen = *sql.Plugin - } - - // TODO: This feels like a hack that will bite us later - joined := make([]string, 0, len(sql.Schema)) - for _, s := range sql.Schema { - joined = append(joined, filepath.Join(dir, s)) - } - sql.Schema = joined - - joined = make([]string, 0, len(sql.Queries)) - for _, q := range sql.Queries { - joined = append(joined, filepath.Join(dir, q)) - } - sql.Queries = joined - - var name, lang string - parseOpts := opts.Parser{ - Debug: debug.Debug, - } - - switch { - case sql.Gen.Go != nil: - name = combo.Go.Package - lang = "golang" - - case sql.Plugin != nil: - lang = fmt.Sprintf("process:%s", sql.Plugin.Plugin) - name = sql.Plugin.Plugin - } - - packageRegion := trace.StartRegion(gctx, "package") - trace.Logf(gctx, "", "name=%s dir=%s plugin=%s", name, dir, lang) - - result, failed := parse(gctx, name, dir, sql.SQL, combo, parseOpts, errout) - if failed { - packageRegion.End() - errored = true - return nil - } - - out, resp, err := codegen(gctx, combo, sql, result) - if err != nil { - fmt.Fprintf(errout, "# package %s\n", name) - fmt.Fprintf(errout, "error generating code: %s\n", err) - errored = true - packageRegion.End() - return nil - } - - files := map[string]string{} - for _, file := range resp.Files { - files[file.Name] = string(file.Contents) - } - - m.Lock() - for n, source := range files { - filename := filepath.Join(dir, out, n) - output[filename] = source - } - m.Unlock() - - packageRegion.End() - return nil - }) +func (g *generator) ProcessResult(ctx context.Context, combo config.CombinedSettings, sql OutputPair, result *compiler.Result) error { + out, resp, err := codegen(ctx, combo, sql, result) + if err != nil { + return err } - if err := grp.Wait(); err != nil { - return nil, err + files := map[string]string{} + for _, file := range resp.Files { + files[file.Name] = string(file.Contents) } - if errored { - for i, _ := range stderrs { - if _, err := io.Copy(stderr, &stderrs[i]); err != nil { - return nil, err - } + g.m.Lock() + + // out is specified by the user, not a plugin + absout := filepath.Join(g.dir, out) + + for n, source := range files { + filename := filepath.Join(g.dir, out, n) + // filepath.Join calls filepath.Clean which should remove all "..", but + // double check to make sure + if strings.Contains(filename, "..") { + return fmt.Errorf("invalid file output path: %s", filename) + } + // The output file must be contained inside the output directory + if !strings.HasPrefix(filename, absout) { + return fmt.Errorf("invalid file output path: %s", filename) } - return nil, fmt.Errorf("errored") + g.output[filename] = source } - return output, nil + g.m.Unlock() + return nil } func remoteGenerate(ctx context.Context, configPath string, conf *config.Config, dir string, stderr io.Writer) (map[string]string, error) { @@ -347,7 +296,11 @@ 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, err := compiler.NewCompiler(sql, combo) - defer c.Close(ctx) + defer func() { + if c != nil { + c.Close(ctx) + } + }() if err != nil { fmt.Fprintf(stderr, "error creating compiler: %s\n", err) return nil, true @@ -380,10 +333,10 @@ func parse(ctx context.Context, name, dir string, sql config.SQL, combo config.C return c.Result(), false } -func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, result *compiler.Result) (string, *plugin.CodeGenResponse, error) { +func codegen(ctx context.Context, combo config.CombinedSettings, sql OutputPair, result *compiler.Result) (string, *plugin.GenerateResponse, error) { defer trace.StartRegion(ctx, "codegen").End() req := codeGenRequest(result, combo) - var handler ext.Handler + var handler grpc.ClientConnInterface var out string switch { case sql.Plugin != nil: @@ -396,8 +349,9 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re switch { case plug.Process != nil: handler = &process.Runner{ - Cmd: plug.Process.Cmd, - Env: plug.Env, + Cmd: plug.Process.Cmd, + Env: plug.Env, + Format: plug.Process.Format, } case plug.WASM != nil: handler = &wasm.Runner{ @@ -411,10 +365,19 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re opts, err := convert.YAMLtoJSON(sql.Plugin.Options) if err != nil { - return "", nil, fmt.Errorf("invalid plugin options") + return "", nil, fmt.Errorf("invalid plugin options: %w", err) } req.PluginOptions = opts + global, found := combo.Global.Options[plug.Name] + if found { + opts, err := convert.YAMLtoJSON(global) + if err != nil { + return "", nil, fmt.Errorf("invalid global options: %w", err) + } + req.GlobalOptions = opts + } + case sql.Gen.Go != nil: out = combo.Go.Out handler = ext.HandleFunc(golang.Generate) @@ -424,6 +387,14 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re } req.PluginOptions = opts + if combo.Global.Overrides.Go != nil { + opts, err := json.Marshal(combo.Global.Overrides.Go) + if err != nil { + return "", nil, fmt.Errorf("opts marshal failed: %w", err) + } + req.GlobalOptions = opts + } + case sql.Gen.JSON != nil: out = combo.JSON.Out handler = ext.HandleFunc(genjson.Generate) @@ -436,6 +407,7 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re default: return "", nil, fmt.Errorf("missing language backend") } - resp, err := handler.Generate(ctx, req) + client := plugin.NewCodegenServiceClient(handler) + resp, err := client.Generate(ctx, req) return out, resp, err } diff --git a/internal/cmd/options.go b/internal/cmd/options.go index 8dd99fb04f..02d3614f4e 100644 --- a/internal/cmd/options.go +++ b/internal/cmd/options.go @@ -7,8 +7,13 @@ import ( ) type Options struct { - Env Env - Stderr io.Writer + Env Env + Stderr io.Writer + // TODO: Move these to a command-specific struct + Tags []string + Against string + + // Testing only MutateConfig func(*config.Config) } diff --git a/internal/cmd/package.go b/internal/cmd/package.go deleted file mode 100644 index c4d3df7fd5..0000000000 --- a/internal/cmd/package.go +++ /dev/null @@ -1,30 +0,0 @@ -package cmd - -import ( - "context" - "os" - - "github.com/sqlc-dev/sqlc/internal/bundler" -) - -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 - } - up := bundler.NewUploader(configPath, dir, conf) - if err := up.Validate(); err != nil { - return err - } - output, err := Generate(ctx, dir, filename, opts) - if err != nil { - os.Exit(1) - } - if e.DryRun { - return up.DumpRequestOut(ctx, output) - } else { - return up.Upload(ctx, output) - } -} diff --git a/internal/cmd/process.go b/internal/cmd/process.go new file mode 100644 index 0000000000..5003d113b8 --- /dev/null +++ b/internal/cmd/process.go @@ -0,0 +1,134 @@ +package cmd + +import ( + "bytes" + "context" + "fmt" + "io" + "path/filepath" + "runtime" + "runtime/trace" + + "golang.org/x/sync/errgroup" + + "github.com/sqlc-dev/sqlc/internal/compiler" + "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/debug" + "github.com/sqlc-dev/sqlc/internal/opts" +) + +type OutputPair struct { + Gen config.SQLGen + Plugin *config.Codegen + + config.SQL +} + +type ResultProcessor interface { + Pairs(context.Context, *config.Config) []OutputPair + ProcessResult(context.Context, config.CombinedSettings, OutputPair, *compiler.Result) error +} + +func Process(ctx context.Context, rp ResultProcessor, dir, filename string, o *Options) error { + e := o.Env + stderr := o.Stderr + + configPath, conf, err := o.ReadConfig(dir, filename) + if err != nil { + return err + } + + base := filepath.Base(configPath) + if err := config.Validate(conf); err != nil { + fmt.Fprintf(stderr, "error validating %s: %s\n", base, err) + return err + } + + if err := e.Validate(conf); err != nil { + fmt.Fprintf(stderr, "error validating %s: %s\n", base, err) + return err + } + + return processQuerySets(ctx, rp, conf, dir, o) +} + +func processQuerySets(ctx context.Context, rp ResultProcessor, conf *config.Config, dir string, o *Options) error { + stderr := o.Stderr + + errored := false + + pairs := rp.Pairs(ctx, conf) + grp, gctx := errgroup.WithContext(ctx) + grp.SetLimit(runtime.GOMAXPROCS(0)) + + stderrs := make([]bytes.Buffer, len(pairs)) + + for i, pair := range pairs { + sql := pair + errout := &stderrs[i] + + grp.Go(func() error { + combo := config.Combine(*conf, sql.SQL) + if sql.Plugin != nil { + combo.Codegen = *sql.Plugin + } + + // TODO: This feels like a hack that will bite us later + joined := make([]string, 0, len(sql.Schema)) + for _, s := range sql.Schema { + joined = append(joined, filepath.Join(dir, s)) + } + sql.Schema = joined + + joined = make([]string, 0, len(sql.Queries)) + for _, q := range sql.Queries { + joined = append(joined, filepath.Join(dir, q)) + } + sql.Queries = joined + + var name, lang string + parseOpts := opts.Parser{ + Debug: debug.Debug, + } + + switch { + case sql.Gen.Go != nil: + name = combo.Go.Package + lang = "golang" + + case sql.Plugin != nil: + lang = fmt.Sprintf("process:%s", sql.Plugin.Plugin) + name = sql.Plugin.Plugin + } + + packageRegion := trace.StartRegion(gctx, "package") + trace.Logf(gctx, "", "name=%s dir=%s plugin=%s", name, dir, lang) + + result, failed := parse(gctx, name, dir, sql.SQL, combo, parseOpts, errout) + if failed { + packageRegion.End() + errored = true + return nil + } + if err := rp.ProcessResult(gctx, combo, sql, result); err != nil { + fmt.Fprintf(errout, "# package %s\n", name) + fmt.Fprintf(errout, "error generating code: %s\n", err) + errored = true + } + packageRegion.End() + return nil + }) + } + if err := grp.Wait(); err != nil { + return err + } + if errored { + for i, _ := range stderrs { + if _, err := io.Copy(stderr, &stderrs[i]); err != nil { + return err + } + } + return fmt.Errorf("errored") + } + return nil +} diff --git a/internal/cmd/push.go b/internal/cmd/push.go new file mode 100644 index 0000000000..19aca6739b --- /dev/null +++ b/internal/cmd/push.go @@ -0,0 +1,92 @@ +package cmd + +import ( + "context" + "fmt" + "os" + "sync" + + "github.com/spf13/cobra" + + "github.com/sqlc-dev/sqlc/internal/bundler" + "github.com/sqlc-dev/sqlc/internal/compiler" + "github.com/sqlc-dev/sqlc/internal/config" +) + +func init() { + pushCmd.Flags().StringSliceP("tag", "t", nil, "tag this push with a value") +} + +var pushCmd = &cobra.Command{ + Use: "push", + Aliases: []string{"upload"}, + Short: "Push the schema, queries, and configuration for this project", + RunE: func(cmd *cobra.Command, args []string) error { + stderr := cmd.ErrOrStderr() + dir, name := getConfigPath(stderr, cmd.Flag("file")) + tags, err := cmd.Flags().GetStringSlice("tag") + if err != nil { + return err + } + opts := &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + Tags: tags, + } + if err := Push(cmd.Context(), dir, name, opts); err != nil { + fmt.Fprintf(stderr, "error pushing: %s\n", err) + os.Exit(1) + } + return nil + }, +} + +type pusher struct { + m sync.Mutex + results []*bundler.QuerySetArchive +} + +func (g *pusher) Pairs(ctx context.Context, conf *config.Config) []OutputPair { + var pairs []OutputPair + for _, sql := range conf.SQL { + pairs = append(pairs, OutputPair{ + SQL: sql, + }) + } + return pairs +} + +func (g *pusher) ProcessResult(ctx context.Context, combo config.CombinedSettings, sql OutputPair, result *compiler.Result) error { + req := codeGenRequest(result, combo) + g.m.Lock() + g.results = append(g.results, &bundler.QuerySetArchive{ + Name: sql.Name, + Schema: sql.Schema, + Queries: sql.Queries, + Request: req, + }) + g.m.Unlock() + return nil +} + +func Push(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 + } + up := bundler.NewUploader(configPath, dir, conf) + if err := up.Validate(); err != nil { + return err + } + p := &pusher{} + if err := Process(ctx, p, dir, filename, opts); err != nil { + return err + } + if e.DryRun { + return up.DumpRequestOut(ctx, p.results) + } else { + return up.Upload(ctx, p.results, opts.Tags) + } +} diff --git a/internal/cmd/shim.go b/internal/cmd/shim.go index 587c8bff6d..654500429a 100644 --- a/internal/cmd/shim.go +++ b/internal/cmd/shim.go @@ -1,8 +1,6 @@ package cmd import ( - "strings" - "github.com/sqlc-dev/sqlc/internal/compiler" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/config/convert" @@ -11,53 +9,13 @@ import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) -func pluginOverride(r *compiler.Result, o config.Override) *plugin.Override { - var column string - var table plugin.Identifier - - if o.Column != "" { - colParts := strings.Split(o.Column, ".") - switch len(colParts) { - case 2: - table.Schema = r.Catalog.DefaultSchema - table.Name = colParts[0] - column = colParts[1] - case 3: - table.Schema = colParts[0] - table.Name = colParts[1] - column = colParts[2] - case 4: - table.Catalog = colParts[0] - table.Schema = colParts[1] - table.Name = colParts[2] - column = colParts[3] - } - } - return &plugin.Override{ - CodeType: "", // FIXME - DbType: o.DBType, - Nullable: o.Nullable, - Unsigned: o.Unsigned, - Column: o.Column, - ColumnName: column, - Table: &table, - GoType: pluginGoType(o), - } -} - func pluginSettings(r *compiler.Result, cs config.CombinedSettings) *plugin.Settings { - var over []*plugin.Override - for _, o := range cs.Overrides { - over = append(over, pluginOverride(r, o)) - } return &plugin.Settings{ - Version: cs.Global.Version, - Engine: string(cs.Package.Engine), - Schema: []string(cs.Package.Schema), - Queries: []string(cs.Package.Queries), - Overrides: over, - Rename: cs.Rename, - Codegen: pluginCodegen(cs, cs.Codegen), + Version: cs.Global.Version, + Engine: string(cs.Package.Engine), + Schema: []string(cs.Package.Schema), + Queries: []string(cs.Package.Queries), + Codegen: pluginCodegen(cs, cs.Codegen), } } @@ -101,20 +59,6 @@ func pluginWASM(p config.Plugin) *plugin.Codegen_WASM { return nil } -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, - // which could be a qualified path or an object, as per - // https://docs.sqlc.dev/en/v1.18.0/reference/config.html#type-overriding - return &plugin.ParsedGoType{ - ImportPath: o.GoImportPath, - Package: o.GoPackage, - TypeName: o.GoTypeName, - BasicType: o.GoBasicType, - StructTags: o.GoStructTags, - } -} - func pluginCatalog(c *catalog.Catalog) *plugin.Catalog { var schemas []*plugin.Schema for _, s := range c.Schemas { @@ -279,8 +223,8 @@ func pluginQueryParam(p compiler.Parameter) *plugin.Parameter { } } -func codeGenRequest(r *compiler.Result, settings config.CombinedSettings) *plugin.CodeGenRequest { - return &plugin.CodeGenRequest{ +func codeGenRequest(r *compiler.Result, settings config.CombinedSettings) *plugin.GenerateRequest { + return &plugin.GenerateRequest{ Settings: pluginSettings(r, settings), Catalog: pluginCatalog(r.Catalog), Queries: pluginQueries(r), diff --git a/internal/cmd/verify.go b/internal/cmd/verify.go new file mode 100644 index 0000000000..a52c218bff --- /dev/null +++ b/internal/cmd/verify.go @@ -0,0 +1,156 @@ +package cmd + +import ( + "context" + "database/sql" + "errors" + "fmt" + "log/slog" + "os" + + _ "github.com/jackc/pgx/v5/stdlib" + "github.com/spf13/cobra" + "google.golang.org/protobuf/proto" + + "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/dbmanager" + "github.com/sqlc-dev/sqlc/internal/migrations" + "github.com/sqlc-dev/sqlc/internal/plugin" + "github.com/sqlc-dev/sqlc/internal/quickdb" + pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" + "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" +) + +func init() { + verifyCmd.Flags().String("against", "", "compare against this tag") +} + +var verifyCmd = &cobra.Command{ + Use: "verify", + Short: "Verify schema, queries, and configuration for this project", + RunE: func(cmd *cobra.Command, args []string) error { + stderr := cmd.ErrOrStderr() + dir, name := getConfigPath(stderr, cmd.Flag("file")) + against, err := cmd.Flags().GetString("against") + if err != nil { + return err + } + opts := &Options{ + Env: ParseEnv(cmd), + Stderr: stderr, + Against: against, + } + if err := Verify(cmd.Context(), dir, name, opts); err != nil { + fmt.Fprintf(stderr, "Error verifying queries: %s\n", err) + os.Exit(1) + } + return nil + }, +} + +func Verify(ctx context.Context, dir, filename string, opts *Options) error { + stderr := opts.Stderr + _, conf, err := readConfig(stderr, dir, filename) + if err != nil { + return err + } + + client, err := quickdb.NewClientFromConfig(conf.Cloud) + if err != nil { + return fmt.Errorf("client init failed: %w", err) + } + + manager := dbmanager.NewClient(conf.Servers) + + // Get query sets from a previous archive by tag. If no tag is provided, get + // the latest query sets. + previous, err := client.GetQuerySets(ctx, &pb.GetQuerySetsRequest{ + Tag: opts.Against, + }) + if err != nil { + return err + } + + // Create a mapping of name to query set + existing := map[string]config.SQL{} + for _, qs := range conf.SQL { + existing[qs.Name] = qs + } + + var verr error + for _, qs := range previous.QuerySets { + // TODO: Create a function for this so that we can return early on errors + + check := func() error { + if qs.Name == "" { + return fmt.Errorf("unnamed query set") + } + + current, found := existing[qs.Name] + if !found { + return fmt.Errorf("unknown query set: %s", qs.Name) + } + + // Read the schema files into memory, removing rollback statements + var ddl []string + files, err := sqlpath.Glob(current.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))) + } + + var codegen plugin.GenerateRequest + if err := proto.Unmarshal(qs.CodegenRequest.Contents, &codegen); err != nil { + return err + } + + // Create (or re-use) a database to verify against + resp, err := manager.CreateDatabase(ctx, &dbmanager.CreateDatabaseRequest{ + Engine: string(current.Engine), + Migrations: ddl, + }) + if err != nil { + return err + } + + db, err := sql.Open("pgx", resp.Uri) + if err != nil { + return err + } + defer db.Close() + + var qerr error + for _, query := range codegen.Queries { + stmt, err := db.PrepareContext(ctx, query.Text) + if err != nil { + fmt.Fprintf(stderr, "Failed to prepare the following query:\n") + fmt.Fprintf(stderr, "%s\n", query.Text) + fmt.Fprintf(stderr, "Error was: %s\n", err) + qerr = err + continue + } + if err := stmt.Close(); err != nil { + slog.Error("stmt.Close failed", "err", err) + } + } + + return qerr + } + + if err := check(); err != nil { + verr = errors.New("errored") + fmt.Fprintf(stderr, "FAIL\t%s\n", qs.Name) + fmt.Fprintf(stderr, " ERROR\t%s\n", err) + } else { + fmt.Fprintf(stderr, "ok\t%s\n", qs.Name) + } + } + + return verr +} diff --git a/internal/cmd/vet.go b/internal/cmd/vet.go index 2d3e1c24b3..8a7f8077db 100644 --- a/internal/cmd/vet.go +++ b/internal/cmd/vet.go @@ -6,11 +6,13 @@ import ( "encoding/json" "errors" "fmt" + "github.com/sqlc-dev/sqlc/internal/constants" "io" "log" "os" "path/filepath" "runtime/trace" + "slices" "strings" "time" @@ -18,17 +20,16 @@ import ( "github.com/google/cel-go/cel" "github.com/google/cel-go/ext" "github.com/jackc/pgx/v5" - _ "github.com/mattn/go-sqlite3" "github.com/spf13/cobra" "google.golang.org/protobuf/encoding/protojson" "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/dbmanager" "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" - pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" "github.com/sqlc-dev/sqlc/internal/shfmt" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" "github.com/sqlc-dev/sqlc/internal/vet" @@ -38,9 +39,6 @@ var ErrFailedChecks = errors.New("failed checks") var pjson = protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} -const RuleDbPrepare = "sqlc/db-prepare" -const QueryFlagSqlcVetDisable = "@sqlc-vet-disable" - func NewCmdVet() *cobra.Command { return &cobra.Command{ Use: "vet", @@ -110,7 +108,7 @@ func Vet(ctx context.Context, dir, filename string, opts *Options) error { } rules := map[string]rule{ - RuleDbPrepare: {NeedsPrepare: true}, + constants.QueryRuleDbPrepare: {NeedsPrepare: true}, } for _, c := range conf.Rules { @@ -334,7 +332,9 @@ type dbPreparer struct { func (p *dbPreparer) Prepare(ctx context.Context, name, query string) error { s, err := p.db.PrepareContext(ctx, query) - s.Close() + if s != nil { + s.Close() + } return err } @@ -385,7 +385,7 @@ type checker struct { Env *cel.Env Stderr io.Writer OnlyManagedDB bool - Client pb.QuickClient + Client dbmanager.Client Replacer *shfmt.Replacer } @@ -402,16 +402,9 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f return uri, cleanup, err } - if s.Engine != config.EnginePostgreSQL { - return "", cleanup, fmt.Errorf("managed: only PostgreSQL currently") - } - if c.Client == nil { // FIXME: Eventual race condition - client, err := quickdb.NewClientFromConfig(c.Conf.Cloud) - if err != nil { - return "", cleanup, fmt.Errorf("managed: client: %w", err) - } + client := dbmanager.NewClient(c.Conf.Servers) c.Client = client } @@ -428,23 +421,27 @@ func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, f ddl = append(ddl, migrations.RemoveRollbackStatements(string(contents))) } - resp, err := c.Client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ - Engine: "postgresql", - Region: quickdb.GetClosestRegion(), + resp, err := c.Client.CreateDatabase(ctx, &dbmanager.CreateDatabaseRequest{ + Engine: string(s.Engine), Migrations: ddl, }) if err != nil { return "", cleanup, fmt.Errorf("managed: create database: %w", err) } - cleanup = func() error { - _, err := c.Client.DropEphemeralDatabase(ctx, &pb.DropEphemeralDatabaseRequest{ - DatabaseId: resp.DatabaseId, - }) - return err + var uri string + switch s.Engine { + case config.EngineMySQL: + dburi, err := quickdb.MySQLReformatURI(resp.Uri) + if err != nil { + return "", cleanup, fmt.Errorf("reformat uri: %w", err) + } + uri = dburi + default: + uri = resp.Uri } - return resp.Uri, cleanup, nil + return uri, cleanup, nil } func (c *checker) DSN(dsn string) (string, error) { @@ -519,7 +516,7 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { prep = &dbPreparer{db} expl = &mysqlExplainer{db} case config.EngineSQLite: - db, err := sql.Open("sqlite3", dburl) + db, err := sql.Open("sqlite", dburl) if err != nil { return fmt.Errorf("database: connection error: %s", err) } @@ -540,11 +537,23 @@ 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].Metadata.Flags[QueryFlagSqlcVetDisable] { - if debug.Active { - log.Printf("Skipping vet rules for query: %s\n", query.Name) + md := result.Queries[i].Metadata + if md.Flags[constants.QueryFlagSqlcVetDisable] { + // If the vet disable flag is specified without any rules listed, all rules are ignored. + if len(md.RuleSkiplist) == 0 { + if debug.Active { + log.Printf("Skipping all vet rules for query: %s\n", query.Name) + } + continue + } + + // Rules which are listed to be disabled but not declared in the config file are rejected. + for r := range md.RuleSkiplist { + if !slices.Contains(s.Rules, r) { + fmt.Fprintf(c.Stderr, "%s: %s: rule-check error: rule %q does not exist in the config file\n", query.Filename, query.Name, r) + errored = true + } } - continue } evalMap := map[string]any{ @@ -553,81 +562,88 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { } for _, name := range s.Rules { - rule, ok := c.Rules[name] - if !ok { - return fmt.Errorf("type-check error: a rule with the name '%s' does not exist", name) - } - - if rule.NeedsPrepare { - if prep == nil { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: database connection required\n", query.Filename, query.Name, name) - errored = true - continue + if _, skip := md.RuleSkiplist[name]; skip { + if debug.Active { + log.Printf("Skipping vet rule %q for query: %s\n", name, query.Name) } - prepName := fmt.Sprintf("sqlc_vet_%d_%d", time.Now().Unix(), i) - if err := prep.Prepare(ctx, prepName, query.Text); err != nil { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: %s\n", query.Filename, query.Name, name, err) - errored = true - continue + } else { + rule, ok := c.Rules[name] + if !ok { + return fmt.Errorf("type-check error: a rule with the name '%s' does not exist", name) } - } - - // short-circuit for "sqlc/db-prepare" rule which doesn't have a CEL program - if rule.Program == nil { - continue - } - // Get explain output for this query if we need it - _, pgsqlOK := evalMap["postgresql"] - _, mysqlOK := evalMap["mysql"] - if rule.NeedsExplain && !(pgsqlOK || mysqlOK) { - if expl == nil { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error explaining query: database connection required\n", query.Filename, query.Name, name) - errored = true - continue + if rule.NeedsPrepare { + if prep == nil { + fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: database connection required\n", query.Filename, query.Name, name) + errored = true + continue + } + prepName := fmt.Sprintf("sqlc_vet_%d_%d", time.Now().Unix(), i) + if err := prep.Prepare(ctx, prepName, query.Text); err != nil { + fmt.Fprintf(c.Stderr, "%s: %s: %s: error preparing query: %s\n", query.Filename, query.Name, name, err) + errored = true + continue + } } - engineOutput, err := expl.Explain(ctx, query.Text, query.Params...) - if err != nil { - fmt.Fprintf(c.Stderr, "%s: %s: %s: error explaining query: %s\n", query.Filename, query.Name, name, err) - errored = true + + // short-circuit for "sqlc/db-prepare" rule which doesn't have a CEL program + if rule.Program == nil { continue } - evalMap["postgresql"] = engineOutput.PostgreSQL - evalMap["mysql"] = engineOutput.MySQL - } + // Get explain output for this query if we need it + _, pgsqlOK := evalMap["postgresql"] + _, mysqlOK := evalMap["mysql"] + if rule.NeedsExplain && !(pgsqlOK || mysqlOK) { + if expl == nil { + fmt.Fprintf(c.Stderr, "%s: %s: %s: error explaining query: database connection required\n", query.Filename, query.Name, name) + errored = true + continue + } + engineOutput, err := expl.Explain(ctx, query.Text, query.Params...) + if err != nil { + fmt.Fprintf(c.Stderr, "%s: %s: %s: error explaining query: %s\n", query.Filename, query.Name, name, err) + errored = true + continue + } + + evalMap["postgresql"] = engineOutput.PostgreSQL + evalMap["mysql"] = engineOutput.MySQL + } - if debug.Debug.DumpVetEnv { - fmt.Printf("vars for rule '%s' evaluating against query '%s':\n", name, query.Name) - debug.DumpAsJSON(evalMap) - } + if debug.Debug.DumpVetEnv { + fmt.Printf("vars for rule '%s' evaluating against query '%s':\n", name, query.Name) + debug.DumpAsJSON(evalMap) + } - out, _, err := (*rule.Program).Eval(evalMap) - if err != nil { - return err - } - tripped, ok := out.Value().(bool) - if !ok { - return fmt.Errorf("expression returned non-bool value: %v", out.Value()) - } - if tripped { - // TODO: Get line numbers in the output - if rule.Message == "" { - fmt.Fprintf(c.Stderr, "%s: %s: %s\n", query.Filename, query.Name, name) - } else { - fmt.Fprintf(c.Stderr, "%s: %s: %s: %s\n", query.Filename, query.Name, name, rule.Message) + out, _, err := (*rule.Program).Eval(evalMap) + if err != nil { + return err + } + tripped, ok := out.Value().(bool) + if !ok { + return fmt.Errorf("expression returned non-bool value: %v", out.Value()) + } + if tripped { + // TODO: Get line numbers in the output + if rule.Message == "" { + fmt.Fprintf(c.Stderr, "%s: %s: %s\n", query.Filename, query.Name, name) + } else { + fmt.Fprintf(c.Stderr, "%s: %s: %s: %s\n", query.Filename, query.Name, name, rule.Message) + } + errored = true } - errored = true } } } + if errored { return ErrFailedChecks } return nil } -func vetConfig(req *plugin.CodeGenRequest) *vet.Config { +func vetConfig(req *plugin.GenerateRequest) *vet.Config { return &vet.Config{ Version: req.Settings.Version, Engine: req.Settings.Engine, diff --git a/internal/cmd/vet_modernc.go b/internal/cmd/vet_modernc.go new file mode 100644 index 0000000000..74313007af --- /dev/null +++ b/internal/cmd/vet_modernc.go @@ -0,0 +1,7 @@ +//go:build !wasm + +package cmd + +import ( + _ "modernc.org/sqlite" +) diff --git a/internal/codegen/golang/driver.go b/internal/codegen/golang/driver.go index 7ef723b55e..5e3a533dcc 100644 --- a/internal/codegen/golang/driver.go +++ b/internal/codegen/golang/driver.go @@ -1,46 +1,14 @@ package golang -type SQLDriver string +import "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" -const ( - SQLPackagePGXV4 string = "pgx/v4" - SQLPackagePGXV5 string = "pgx/v5" - SQLPackageStandard string = "database/sql" -) - -const ( - SQLDriverPGXV4 SQLDriver = "github.com/jackc/pgx/v4" - SQLDriverPGXV5 = "github.com/jackc/pgx/v5" - SQLDriverLibPQ = "github.com/lib/pq" - SQLDriverGoSQLDriverMySQL = "github.com/go-sql-driver/mysql" -) - -func parseDriver(sqlPackage string) SQLDriver { +func parseDriver(sqlPackage string) opts.SQLDriver { switch sqlPackage { - case SQLPackagePGXV4: - return SQLDriverPGXV4 - case SQLPackagePGXV5: - return SQLDriverPGXV5 - default: - return SQLDriverLibPQ - } -} - -func (d SQLDriver) IsPGX() bool { - return d == SQLDriverPGXV4 || d == SQLDriverPGXV5 -} - -func (d SQLDriver) IsGoSQLDriverMySQL() bool { - return d == SQLDriverGoSQLDriverMySQL -} - -func (d SQLDriver) Package() string { - switch d { - case SQLDriverPGXV4: - return SQLPackagePGXV4 - case SQLDriverPGXV5: - return SQLPackagePGXV5 + case opts.SQLPackagePGXV4: + return opts.SQLDriverPGXV4 + case opts.SQLPackagePGXV5: + return opts.SQLDriverPGXV5 default: - return SQLPackageStandard + return opts.SQLDriverLibPQ } } diff --git a/internal/codegen/golang/field.go b/internal/codegen/golang/field.go index 2a8d9ccdfc..2a63b6d342 100644 --- a/internal/codegen/golang/field.go +++ b/internal/codegen/golang/field.go @@ -6,6 +6,7 @@ import ( "sort" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/plugin" ) @@ -40,7 +41,7 @@ func TagsToString(tags map[string]string) string { return strings.Join(tagParts, " ") } -func JSONTagName(name string, options *opts) string { +func JSONTagName(name string, options *opts.Options) string { style := options.JsonTagsCaseStyle idUppercase := options.JsonTagsIdUppercase if style == "" || style == "none" { diff --git a/internal/codegen/golang/gen.go b/internal/codegen/golang/gen.go index ea3d8384cd..7df56a0a41 100644 --- a/internal/codegen/golang/gen.go +++ b/internal/codegen/golang/gen.go @@ -10,6 +10,7 @@ import ( "strings" "text/template" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/plugin" @@ -18,7 +19,7 @@ import ( type tmplCtx struct { Q string Package string - SQLDriver SQLDriver + SQLDriver opts.SQLDriver Enums []Enum Structs []Struct GoQueries []Query @@ -38,7 +39,9 @@ type tmplCtx struct { EmitAllEnumValues bool UsesCopyFrom bool UsesBatch bool + OmitSqlcVersion bool BuildTags string + WrapErrors bool } func (t *tmplCtx) OutputQuery(sourceName string) bool { @@ -96,19 +99,22 @@ func (t *tmplCtx) codegenQueryRetval(q Query) (string, error) { case ":execrows", ":execlastid": return "result, err :=", nil case ":execresult": + if t.WrapErrors { + return "result, err :=", nil + } return "return", nil default: return "", fmt.Errorf("unhandled q.Cmd case %q", q.Cmd) } } -func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { - options, err := parseOpts(req) +func Generate(ctx context.Context, req *plugin.GenerateRequest) (*plugin.GenerateResponse, error) { + options, err := opts.Parse(req) if err != nil { return nil, err } - if err := validateOpts(options); err != nil { + if err := opts.ValidateOpts(options); err != nil { return nil, err } @@ -123,16 +129,46 @@ func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenR enums, structs = filterUnusedStructs(enums, structs, queries) } + if err := validate(options, enums, structs, queries); err != nil { + return nil, err + } + return generate(req, options, enums, structs, queries) } -func generate(req *plugin.CodeGenRequest, options *opts, enums []Enum, structs []Struct, queries []Query) (*plugin.CodeGenResponse, error) { +func validate(options *opts.Options, enums []Enum, structs []Struct, queries []Query) error { + enumNames := make(map[string]struct{}) + for _, enum := range enums { + enumNames[enum.Name] = struct{}{} + enumNames["Null"+enum.Name] = struct{}{} + } + structNames := make(map[string]struct{}) + for _, struckt := range structs { + if _, ok := enumNames[struckt.Name]; ok { + return fmt.Errorf("struct name conflicts with enum name: %s", struckt.Name) + } + structNames[struckt.Name] = struct{}{} + } + if !options.EmitExportedQueries { + return nil + } + for _, query := range queries { + if _, ok := enumNames[query.ConstantName]; ok { + return fmt.Errorf("query constant name conflicts with enum name: %s", query.ConstantName) + } + if _, ok := structNames[query.ConstantName]; ok { + return fmt.Errorf("query constant name conflicts with struct name: %s", query.ConstantName) + } + } + return nil +} + +func generate(req *plugin.GenerateRequest, options *opts.Options, enums []Enum, structs []Struct, queries []Query) (*plugin.GenerateResponse, error) { i := &importer{ - Settings: req.Settings, - Options: options, - Queries: queries, - Enums: enums, - Structs: structs, + Options: options, + Queries: queries, + Enums: enums, + Structs: structs, } tctx := tmplCtx{ @@ -154,17 +190,19 @@ func generate(req *plugin.CodeGenRequest, options *opts, enums []Enum, structs [ Structs: structs, SqlcVersion: req.SqlcVersion, BuildTags: options.BuildTags, + OmitSqlcVersion: options.OmitSqlcVersion, + WrapErrors: options.WrapErrors, } - if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && options.SqlDriver != SQLDriverGoSQLDriverMySQL { + if tctx.UsesCopyFrom && !tctx.SQLDriver.IsPGX() && options.SqlDriver != opts.SQLDriverGoSQLDriverMySQL { return nil, errors.New(":copyfrom is only supported by pgx and github.com/go-sql-driver/mysql") } - if tctx.UsesCopyFrom && options.SqlDriver == SQLDriverGoSQLDriverMySQL { + if tctx.UsesCopyFrom && options.SqlDriver == opts.SQLDriverGoSQLDriverMySQL { if err := checkNoTimesForMySQLCopyFrom(queries); err != nil { return nil, err } - tctx.SQLDriver = SQLDriverGoSQLDriverMySQL + tctx.SQLDriver = opts.SQLDriverGoSQLDriverMySQL } if tctx.UsesBatch && !tctx.SQLDriver.IsPGX() { @@ -176,6 +214,7 @@ func generate(req *plugin.CodeGenRequest, options *opts, enums []Enum, structs [ "comment": sdk.DoubleSlashComment, "escape": sdk.EscapeBacktick, "imports": i.Imports, + "hasImports": i.HasImports, "hasPrefix": strings.HasPrefix, // These methods are Go specific, they do not belong in the codegen package @@ -282,7 +321,7 @@ func generate(req *plugin.CodeGenRequest, options *opts, enums []Enum, structs [ return nil, err } } - resp := plugin.CodeGenResponse{} + resp := plugin.GenerateResponse{} for filename, code := range output { resp.Files = append(resp.Files, &plugin.File{ @@ -344,7 +383,7 @@ func filterUnusedStructs(enums []Enum, structs []Struct, queries []Query) ([]Enu keepTypes[query.Ret.Type()] = struct{}{} if query.Ret.IsStruct() { for _, field := range query.Ret.Struct.Fields { - keepTypes[field.Type] = struct{}{} + keepTypes[strings.TrimPrefix(field.Type, "[]")] = struct{}{} for _, embedField := range field.EmbedFields { keepTypes[embedField.Type] = struct{}{} } diff --git a/internal/codegen/golang/go_type.go b/internal/codegen/golang/go_type.go index 2b5f75bcd4..c4aac84dd6 100644 --- a/internal/codegen/golang/go_type.go +++ b/internal/codegen/golang/go_type.go @@ -3,16 +3,24 @@ package golang import ( "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/plugin" ) -func addExtraGoStructTags(tags map[string]string, req *plugin.CodeGenRequest, col *plugin.Column) { - for _, oride := range req.Settings.Overrides { +func addExtraGoStructTags(tags map[string]string, req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) { + for _, override := range options.Overrides { + oride := override.ShimOverride if oride.GoType.StructTags == nil { continue } - if !sdk.Matches(oride, col.Table, req.Catalog.DefaultSchema) { + if override.MatchesColumn(col) { + for k, v := range oride.GoType.StructTags { + tags[k] = v + } + continue + } + if !override.Matches(col.Table, req.Catalog.DefaultSchema) { // Different table. continue } @@ -31,9 +39,11 @@ func addExtraGoStructTags(tags map[string]string, req *plugin.CodeGenRequest, co } } -func goType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) string { +func goType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { // Check if the column's type has been overridden - for _, oride := range req.Settings.Overrides { + for _, override := range options.Overrides { + oride := override.ShimOverride + if oride.GoType.TypeName == "" { continue } @@ -41,7 +51,7 @@ func goType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) strin if col.OriginalName != "" { cname = col.OriginalName } - sameTable := sdk.Matches(oride, col.Table, req.Catalog.DefaultSchema) + sameTable := override.Matches(col.Table, req.Catalog.DefaultSchema) if oride.Column != "" && sdk.MatchString(oride.ColumnName, cname) && sameTable { if col.IsSqlcSlice { return "[]" + oride.GoType.TypeName @@ -59,16 +69,14 @@ func goType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) strin return typ } -func goInnerType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) string { - columnType := sdk.DataType(col.Type) - notNull := col.NotNull || col.IsArray - +func goInnerType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { // package overrides have a higher precedence - for _, oride := range req.Settings.Overrides { + for _, override := range options.Overrides { + oride := override.ShimOverride if oride.GoType.TypeName == "" { continue } - if oride.DbType != "" && oride.DbType == columnType && oride.Nullable != notNull && oride.Unsigned == col.Unsigned { + if override.MatchesColumn(col) { return oride.GoType.TypeName } } @@ -76,11 +84,11 @@ func goInnerType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) // TODO: Extend the engine interface to handle types switch req.Settings.Engine { case "mysql": - return mysqlType(req, col) + return mysqlType(req, options, col) case "postgresql": return postgresType(req, options, col) case "sqlite": - return sqliteType(req, col) + return sqliteType(req, options, col) default: return "interface{}" } diff --git a/internal/codegen/golang/imports.go b/internal/codegen/golang/imports.go index 11e3dc5b46..ccca4f603c 100644 --- a/internal/codegen/golang/imports.go +++ b/internal/codegen/golang/imports.go @@ -5,8 +5,8 @@ import ( "sort" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/metadata" - "github.com/sqlc-dev/sqlc/internal/plugin" ) type fileImports struct { @@ -58,11 +58,10 @@ func mergeImports(imps ...fileImports) [][]ImportSpec { } type importer struct { - Settings *plugin.Settings - Options *opts - Queries []Query - Enums []Enum - Structs []Struct + Options *opts.Options + Queries []Query + Enums []Enum + Structs []Struct } func (i *importer) usesType(typ string) bool { @@ -76,6 +75,11 @@ func (i *importer) usesType(typ string) bool { return false } +func (i *importer) HasImports(filename string) bool { + imports := i.Imports(filename) + return len(imports[0]) != 0 || len(imports[1]) != 0 +} + func (i *importer) Imports(filename string) [][]ImportSpec { dbFileName := "db.go" if i.Options.OutputDbFileName != "" { @@ -122,10 +126,10 @@ func (i *importer) dbImports() fileImports { sqlpkg := parseDriver(i.Options.SqlPackage) switch sqlpkg { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgconn"}) pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v4"}) - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v5/pgconn"}) pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v5"}) default: @@ -156,7 +160,7 @@ var pqtypeTypes = map[string]struct{}{ "pqtype.NullRawMessage": {}, } -func buildImports(settings *plugin.Settings, options *opts, queries []Query, uses func(string) bool) (map[string]struct{}, map[ImportSpec]struct{}) { +func buildImports(options *opts.Options, queries []Query, uses func(string) bool) (map[string]struct{}, map[ImportSpec]struct{}) { pkg := make(map[ImportSpec]struct{}) std := make(map[string]struct{}) @@ -168,9 +172,9 @@ func buildImports(settings *plugin.Settings, options *opts, queries []Query, use for _, q := range queries { if q.Cmd == metadata.CmdExecResult { switch sqlpkg { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: pkg[ImportSpec{Path: "github.com/jackc/pgconn"}] = struct{}{} - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: pkg[ImportSpec{Path: "github.com/jackc/pgx/v5/pgconn"}] = struct{}{} default: std["database/sql"] = struct{}{} @@ -185,7 +189,7 @@ func buildImports(settings *plugin.Settings, options *opts, queries []Query, use } if uses("pgtype.") { - if sqlpkg == SQLDriverPGXV5 { + if sqlpkg == opts.SQLDriverPGXV5 { pkg[ImportSpec{Path: "github.com/jackc/pgx/v5/pgtype"}] = struct{}{} } else { pkg[ImportSpec{Path: "github.com/jackc/pgtype"}] = struct{}{} @@ -200,7 +204,8 @@ func buildImports(settings *plugin.Settings, options *opts, queries []Query, use } overrideTypes := map[string]string{} - for _, o := range settings.Overrides { + for _, override := range options.Overrides { + o := override.ShimOverride if o.GoType.BasicType || o.GoType.TypeName == "" { continue } @@ -225,7 +230,9 @@ func buildImports(settings *plugin.Settings, options *opts, queries []Query, use } // Custom imports - for _, o := range settings.Overrides { + for _, override := range options.Overrides { + o := override.ShimOverride + if o.GoType.BasicType || o.GoType.TypeName == "" { continue } @@ -240,7 +247,7 @@ func buildImports(settings *plugin.Settings, options *opts, queries []Query, use } func (i *importer) interfaceImports() fileImports { - std, pkg := buildImports(i.Settings, i.Options, i.Queries, func(name string) bool { + std, pkg := buildImports(i.Options, i.Queries, func(name string) bool { for _, q := range i.Queries { if q.hasRetType() { if usesBatch([]Query{q}) { @@ -265,7 +272,7 @@ func (i *importer) interfaceImports() fileImports { } func (i *importer) modelImports() fileImports { - std, pkg := buildImports(i.Settings, i.Options, nil, i.usesType) + std, pkg := buildImports(i.Options, nil, i.usesType) if len(i.Enums) > 0 { std["fmt"] = struct{}{} @@ -304,7 +311,7 @@ func (i *importer) queryImports(filename string) fileImports { } } - std, pkg := buildImports(i.Settings, i.Options, gq, func(name string) bool { + std, pkg := buildImports(i.Options, gq, func(name string) bool { for _, q := range gq { if q.hasRetType() { if q.Ret.EmitStruct() { @@ -388,13 +395,17 @@ func (i *importer) queryImports(filename string) fileImports { } sqlpkg := parseDriver(i.Options.SqlPackage) - if sqlcSliceScan() { + if sqlcSliceScan() && !sqlpkg.IsPGX() { std["strings"] = struct{}{} } if sliceScan() && !sqlpkg.IsPGX() { pkg[ImportSpec{Path: "github.com/lib/pq"}] = struct{}{} } + if i.Options.WrapErrors { + std["fmt"] = struct{}{} + } + return sortedImports(std, pkg) } @@ -405,7 +416,7 @@ func (i *importer) copyfromImports() fileImports { copyFromQueries = append(copyFromQueries, q) } } - std, pkg := buildImports(i.Settings, i.Options, copyFromQueries, func(name string) bool { + std, pkg := buildImports(i.Options, copyFromQueries, func(name string) bool { for _, q := range copyFromQueries { if q.hasRetType() { if strings.HasPrefix(q.Ret.Type(), name) { @@ -422,7 +433,7 @@ func (i *importer) copyfromImports() fileImports { }) std["context"] = struct{}{} - if i.Options.SqlDriver == SQLDriverGoSQLDriverMySQL { + if i.Options.SqlDriver == opts.SQLDriverGoSQLDriverMySQL { std["io"] = struct{}{} std["fmt"] = struct{}{} std["sync/atomic"] = struct{}{} @@ -440,7 +451,7 @@ func (i *importer) batchImports() fileImports { batchQueries = append(batchQueries, q) } } - std, pkg := buildImports(i.Settings, i.Options, batchQueries, func(name string) bool { + std, pkg := buildImports(i.Options, batchQueries, func(name string) bool { for _, q := range batchQueries { if q.hasRetType() { if q.Ret.EmitStruct() { @@ -474,9 +485,9 @@ func (i *importer) batchImports() fileImports { std["errors"] = struct{}{} sqlpkg := parseDriver(i.Options.SqlPackage) switch sqlpkg { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: pkg[ImportSpec{Path: "github.com/jackc/pgx/v4"}] = struct{}{} - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: pkg[ImportSpec{Path: "github.com/jackc/pgx/v5"}] = struct{}{} } diff --git a/internal/codegen/golang/mysql_type.go b/internal/codegen/golang/mysql_type.go index c89d8ff3c7..b8e8aa43c7 100644 --- a/internal/codegen/golang/mysql_type.go +++ b/internal/codegen/golang/mysql_type.go @@ -3,12 +3,13 @@ package golang import ( "log" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/plugin" ) -func mysqlType(req *plugin.CodeGenRequest, col *plugin.Column) string { +func mysqlType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { columnType := sdk.DataType(col.Type) notNull := col.NotNull || col.IsArray unsigned := col.Unsigned @@ -30,14 +31,31 @@ func mysqlType(req *plugin.CodeGenRequest, col *plugin.Column) string { } else { if notNull { if unsigned { - return "uint32" + return "uint8" } - return "int32" + return "int8" } - return "sql.NullInt32" + // The database/sql package does not have a sql.NullInt8 type, so we + // use the smallest type they have which is NullInt16 + return "sql.NullInt16" } - case "int", "integer", "smallint", "mediumint", "year": + case "year": + if notNull { + return "int16" + } + return "sql.NullInt16" + + case "smallint": + if notNull { + if unsigned { + return "uint16" + } + return "int16" + } + return "sql.NullInt16" + + case "int", "integer", "mediumint": if notNull { if unsigned { return "uint32" @@ -101,14 +119,14 @@ func mysqlType(req *plugin.CodeGenRequest, col *plugin.Column) string { if enum.Name == columnType { if notNull { if schema.Name == req.Catalog.DefaultSchema { - return StructName(enum.Name, req.Settings) + return StructName(enum.Name, options) } - return StructName(schema.Name+"_"+enum.Name, req.Settings) + return StructName(schema.Name+"_"+enum.Name, options) } else { if schema.Name == req.Catalog.DefaultSchema { - return "Null" + StructName(enum.Name, req.Settings) + return "Null" + StructName(enum.Name, options) } - return "Null" + StructName(schema.Name+"_"+enum.Name, req.Settings) + return "Null" + StructName(schema.Name+"_"+enum.Name, options) } } } diff --git a/internal/codegen/golang/opts.go b/internal/codegen/golang/opts.go deleted file mode 100644 index 53be536881..0000000000 --- a/internal/codegen/golang/opts.go +++ /dev/null @@ -1,69 +0,0 @@ -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 included in marshaled json we receive - 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 -} - -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/codegen/golang/opts/enum.go b/internal/codegen/golang/opts/enum.go new file mode 100644 index 0000000000..40457d040a --- /dev/null +++ b/internal/codegen/golang/opts/enum.go @@ -0,0 +1,64 @@ +package opts + +import "fmt" + +type SQLDriver string + +const ( + SQLPackagePGXV4 string = "pgx/v4" + SQLPackagePGXV5 string = "pgx/v5" + SQLPackageStandard string = "database/sql" +) + +var validPackages = map[string]struct{}{ + string(SQLPackagePGXV4): {}, + string(SQLPackagePGXV5): {}, + string(SQLPackageStandard): {}, +} + +func validatePackage(sqlPackage string) error { + if _, found := validPackages[sqlPackage]; !found { + return fmt.Errorf("unknown SQL package: %s", sqlPackage) + } + return nil +} + +const ( + SQLDriverPGXV4 SQLDriver = "github.com/jackc/pgx/v4" + SQLDriverPGXV5 = "github.com/jackc/pgx/v5" + SQLDriverLibPQ = "github.com/lib/pq" + SQLDriverGoSQLDriverMySQL = "github.com/go-sql-driver/mysql" +) + +var validDrivers = map[string]struct{}{ + string(SQLDriverPGXV4): {}, + string(SQLDriverPGXV5): {}, + string(SQLDriverLibPQ): {}, + string(SQLDriverGoSQLDriverMySQL): {}, +} + +func validateDriver(sqlDriver string) error { + if _, found := validDrivers[sqlDriver]; !found { + return fmt.Errorf("unknown SQL driver: %s", sqlDriver) + } + return nil +} + +func (d SQLDriver) IsPGX() bool { + return d == SQLDriverPGXV4 || d == SQLDriverPGXV5 +} + +func (d SQLDriver) IsGoSQLDriverMySQL() bool { + return d == SQLDriverGoSQLDriverMySQL +} + +func (d SQLDriver) Package() string { + switch d { + case SQLDriverPGXV4: + return SQLPackagePGXV4 + case SQLDriverPGXV5: + return SQLPackagePGXV5 + default: + return SQLPackageStandard + } +} diff --git a/internal/config/go_type.go b/internal/codegen/golang/opts/go_type.go similarity index 93% rename from internal/config/go_type.go rename to internal/codegen/golang/opts/go_type.go index 14765e5f32..5dcb3e8af0 100644 --- a/internal/config/go_type.go +++ b/internal/codegen/golang/opts/go_type.go @@ -1,4 +1,4 @@ -package config +package opts import ( "encoding/json" @@ -16,8 +16,8 @@ type GoType struct { Name string `json:"type" yaml:"type"` Pointer bool `json:"pointer" yaml:"pointer"` Slice bool `json:"slice" yaml:"slice"` - Spec string - BuiltIn bool + Spec string `json:"-"` + BuiltIn bool `json:"-"` } type ParsedGoType struct { @@ -28,6 +28,14 @@ type ParsedGoType struct { StructTag string } +func (o *GoType) MarshalJSON() ([]byte, error) { + if o.Spec != "" { + return json.Marshal(o.Spec) + } + type alias GoType + return json.Marshal(alias(*o)) +} + func (o *GoType) UnmarshalJSON(data []byte) error { var spec string if err := json.Unmarshal(data, &spec); err == nil { @@ -77,7 +85,7 @@ func generatePackageID(importPath string) (string, bool) { } // validate GoType -func (gt GoType) Parse() (*ParsedGoType, error) { +func (gt GoType) parse() (*ParsedGoType, error) { var o ParsedGoType if gt.Spec == "" { @@ -171,7 +179,7 @@ type GoStructTag string // empty string {} // `a:"b"` {"a": "b"} // `a:"b" x:"y,z"` {"a": "b", "x": "y,z"} -func (s GoStructTag) Parse() (map[string]string, error) { +func (s GoStructTag) parse() (map[string]string, error) { m := make(map[string]string) tags, err := structtag.Parse(string(s)) if err != nil { diff --git a/internal/codegen/golang/opts/options.go b/internal/codegen/golang/opts/options.go new file mode 100644 index 0000000000..0d5d51c2dd --- /dev/null +++ b/internal/codegen/golang/opts/options.go @@ -0,0 +1,156 @@ +package opts + +import ( + "encoding/json" + "fmt" + "maps" + "path/filepath" + + "github.com/sqlc-dev/sqlc/internal/plugin" +) + +type Options struct { + EmitInterface bool `json:"emit_interface" yaml:"emit_interface"` + EmitJsonTags bool `json:"emit_json_tags" yaml:"emit_json_tags"` + JsonTagsIdUppercase bool `json:"json_tags_id_uppercase" yaml:"json_tags_id_uppercase"` + EmitDbTags bool `json:"emit_db_tags" yaml:"emit_db_tags"` + EmitPreparedQueries bool `json:"emit_prepared_queries" yaml:"emit_prepared_queries"` + EmitExactTableNames bool `json:"emit_exact_table_names,omitempty" yaml:"emit_exact_table_names"` + EmitEmptySlices bool `json:"emit_empty_slices,omitempty" yaml:"emit_empty_slices"` + EmitExportedQueries bool `json:"emit_exported_queries" yaml:"emit_exported_queries"` + EmitResultStructPointers bool `json:"emit_result_struct_pointers" yaml:"emit_result_struct_pointers"` + EmitParamsStructPointers bool `json:"emit_params_struct_pointers" yaml:"emit_params_struct_pointers"` + EmitMethodsWithDbArgument bool `json:"emit_methods_with_db_argument,omitempty" yaml:"emit_methods_with_db_argument"` + EmitPointersForNullTypes bool `json:"emit_pointers_for_null_types" yaml:"emit_pointers_for_null_types"` + EmitEnumValidMethod bool `json:"emit_enum_valid_method,omitempty" yaml:"emit_enum_valid_method"` + EmitAllEnumValues bool `json:"emit_all_enum_values,omitempty" yaml:"emit_all_enum_values"` + EmitSqlAsComment bool `json:"emit_sql_as_comment,omitempty" yaml:"emit_sql_as_comment"` + JsonTagsCaseStyle string `json:"json_tags_case_style,omitempty" yaml:"json_tags_case_style"` + Package string `json:"package" yaml:"package"` + Out string `json:"out" yaml:"out"` + Overrides []Override `json:"overrides,omitempty" yaml:"overrides"` + Rename map[string]string `json:"rename,omitempty" yaml:"rename"` + SqlPackage string `json:"sql_package" yaml:"sql_package"` + SqlDriver string `json:"sql_driver" yaml:"sql_driver"` + OutputBatchFileName string `json:"output_batch_file_name,omitempty" yaml:"output_batch_file_name"` + OutputDbFileName string `json:"output_db_file_name,omitempty" yaml:"output_db_file_name"` + OutputModelsFileName string `json:"output_models_file_name,omitempty" yaml:"output_models_file_name"` + OutputQuerierFileName string `json:"output_querier_file_name,omitempty" yaml:"output_querier_file_name"` + OutputCopyfromFileName string `json:"output_copyfrom_file_name,omitempty" yaml:"output_copyfrom_file_name"` + OutputFilesSuffix string `json:"output_files_suffix,omitempty" yaml:"output_files_suffix"` + InflectionExcludeTableNames []string `json:"inflection_exclude_table_names,omitempty" yaml:"inflection_exclude_table_names"` + WrapErrors bool `json:"wrap_errors,omitempty" yaml:"wrap_errors"` + QueryParameterLimit *int32 `json:"query_parameter_limit,omitempty" yaml:"query_parameter_limit"` + OmitSqlcVersion bool `json:"omit_sqlc_version,omitempty" yaml:"omit_sqlc_version"` + OmitUnusedStructs bool `json:"omit_unused_structs,omitempty" yaml:"omit_unused_structs"` + BuildTags string `json:"build_tags,omitempty" yaml:"build_tags"` + Initialisms *[]string `json:"initialisms,omitempty" yaml:"initialisms"` + + InitialismsMap map[string]struct{} `json:"-" yaml:"-"` +} + +type GlobalOptions struct { + Overrides []Override `json:"overrides,omitempty" yaml:"overrides"` + Rename map[string]string `json:"rename,omitempty" yaml:"rename"` +} + +func Parse(req *plugin.GenerateRequest) (*Options, error) { + options, err := parseOpts(req) + if err != nil { + return nil, err + } + global, err := parseGlobalOpts(req) + if err != nil { + return nil, err + } + if len(global.Overrides) > 0 { + options.Overrides = append(global.Overrides, options.Overrides...) + } + if len(global.Rename) > 0 { + if options.Rename == nil { + options.Rename = map[string]string{} + } + maps.Copy(options.Rename, global.Rename) + } + return options, nil +} + +func parseOpts(req *plugin.GenerateRequest) (*Options, error) { + var options Options + if len(req.PluginOptions) == 0 { + return &options, nil + } + if err := json.Unmarshal(req.PluginOptions, &options); err != nil { + return nil, fmt.Errorf("unmarshalling plugin options: %w", err) + } + + if options.Package == "" { + if options.Out != "" { + options.Package = filepath.Base(options.Out) + } else { + return nil, fmt.Errorf("invalid options: missing package name") + } + } + + for i := range options.Overrides { + if err := options.Overrides[i].parse(req); err != nil { + return nil, err + } + } + + if options.SqlPackage != "" { + if err := validatePackage(options.SqlPackage); err != nil { + return nil, fmt.Errorf("invalid options: %s", err) + } + } + + if options.SqlDriver != "" { + if err := validateDriver(options.SqlDriver); err != nil { + return nil, fmt.Errorf("invalid options: %s", err) + } + } + + if options.QueryParameterLimit == nil { + options.QueryParameterLimit = new(int32) + *options.QueryParameterLimit = 1 + } + + if options.Initialisms == nil { + options.Initialisms = new([]string) + *options.Initialisms = []string{"id"} + } + + options.InitialismsMap = map[string]struct{}{} + for _, initial := range *options.Initialisms { + options.InitialismsMap[initial] = struct{}{} + } + + return &options, nil +} + +func parseGlobalOpts(req *plugin.GenerateRequest) (*GlobalOptions, error) { + var options GlobalOptions + if len(req.GlobalOptions) == 0 { + return &options, nil + } + if err := json.Unmarshal(req.GlobalOptions, &options); err != nil { + return nil, fmt.Errorf("unmarshalling global options: %w", err) + } + for i := range options.Overrides { + if err := options.Overrides[i].parse(req); err != nil { + return nil, err + } + } + return &options, nil +} + +func ValidateOpts(opts *Options) error { + if opts.EmitMethodsWithDbArgument && opts.EmitPreparedQueries { + return fmt.Errorf("invalid options: emit_methods_with_db_argument and emit_prepared_queries options are mutually exclusive") + } + if *opts.QueryParameterLimit < 0 { + return fmt.Errorf("invalid options: query parameter limit must not be negative") + } + + return nil +} diff --git a/internal/config/override.go b/internal/codegen/golang/opts/override.go similarity index 67% rename from internal/config/override.go rename to internal/codegen/golang/opts/override.go index 0bb050443b..6916c0c7f3 100644 --- a/internal/config/override.go +++ b/internal/codegen/golang/opts/override.go @@ -1,11 +1,13 @@ -package config +package opts import ( "fmt" "os" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/pattern" + "github.com/sqlc-dev/sqlc/internal/plugin" ) type Override struct { @@ -21,7 +23,7 @@ type Override struct { Deprecated_PostgresType string `json:"postgres_type" yaml:"postgres_type"` // for global overrides only when two different engines are in use - Engine Engine `json:"engine,omitempty" yaml:"engine"` + Engine string `json:"engine,omitempty" yaml:"engine"` // True if the GoType should override if the matching type is nullable Nullable bool `json:"nullable" yaml:"nullable"` @@ -35,21 +37,53 @@ type Override struct { // fully qualified name of the column, e.g. `accounts.id` Column string `json:"column" yaml:"column"` - ColumnName *pattern.Match - TableCatalog *pattern.Match - TableSchema *pattern.Match - TableRel *pattern.Match - GoImportPath string - GoPackage string - GoTypeName string - GoBasicType bool + ColumnName *pattern.Match `json:"-"` + TableCatalog *pattern.Match `json:"-"` + TableSchema *pattern.Match `json:"-"` + TableRel *pattern.Match `json:"-"` + GoImportPath string `json:"-"` + GoPackage string `json:"-"` + GoTypeName string `json:"-"` + GoBasicType bool `json:"-"` // Parsed form of GoStructTag, e.g. {"validate:", "required"} - GoStructTags map[string]string + GoStructTags map[string]string `json:"-"` + ShimOverride *ShimOverride `json:"-"` } -func (o *Override) Parse() (err error) { +func (o *Override) Matches(n *plugin.Identifier, 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) MatchesColumn(col *plugin.Column) bool { + columnType := sdk.DataType(col.Type) + notNull := col.NotNull || col.IsArray + return o.DBType != "" && o.DBType == columnType && o.Nullable != notNull && o.Unsigned == col.Unsigned +} +func (o *Override) parse(req *plugin.GenerateRequest) (err error) { // validate deprecated postgres_type field if o.Deprecated_PostgresType != "" { fmt.Fprintf(os.Stderr, "WARNING: \"postgres_type\" is deprecated. Instead, use \"db_type\" to specify a type override.\n") @@ -65,6 +99,11 @@ func (o *Override) Parse() (err error) { o.Nullable = true } + schema := "public" + if req != nil && req.Catalog != nil { + schema = req.Catalog.DefaultSchema + } + // validate option combinations switch { case o.Column != "" && o.DBType != "": @@ -84,7 +123,7 @@ func (o *Override) Parse() (err error) { if o.TableRel, err = pattern.MatchCompile(colParts[0]); err != nil { return err } - if o.TableSchema, err = pattern.MatchCompile("public"); err != nil { + if o.TableSchema, err = pattern.MatchCompile(schema); err != nil { return err } case 3: @@ -116,7 +155,7 @@ func (o *Override) Parse() (err error) { } // validate GoType - parsed, err := o.GoType.Parse() + parsed, err := o.GoType.parse() if err != nil { return err } @@ -126,11 +165,12 @@ func (o *Override) Parse() (err error) { o.GoBasicType = parsed.BasicType // validate GoStructTag - tags, err := o.GoStructTag.Parse() + tags, err := o.GoStructTag.parse() if err != nil { return err } o.GoStructTags = tags + o.ShimOverride = shimOverride(req, o) return nil } diff --git a/internal/codegen/golang/opts/override_test.go b/internal/codegen/golang/opts/override_test.go new file mode 100644 index 0000000000..8405666f36 --- /dev/null +++ b/internal/codegen/golang/opts/override_test.go @@ -0,0 +1,117 @@ +package opts + +import ( + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestTypeOverrides(t *testing.T) { + for _, test := range []struct { + override Override + pkg string + typeName string + basic bool + }{ + { + Override{ + DBType: "uuid", + GoType: GoType{Spec: "github.com/segmentio/ksuid.KSUID"}, + }, + "github.com/segmentio/ksuid", + "ksuid.KSUID", + false, + }, + // TODO: Add test for struct pointers + // + // { + // Override{ + // DBType: "uuid", + // GoType: "github.com/segmentio/*ksuid.KSUID", + // }, + // "github.com/segmentio/ksuid", + // "*ksuid.KSUID", + // false, + // }, + { + Override{ + DBType: "citext", + GoType: GoType{Spec: "string"}, + }, + "", + "string", + true, + }, + { + Override{ + DBType: "timestamp", + GoType: GoType{Spec: "time.Time"}, + }, + "time", + "time.Time", + false, + }, + } { + tt := test + t.Run(tt.override.GoType.Spec, func(t *testing.T) { + if err := tt.override.parse(nil); err != nil { + t.Fatalf("override parsing failed; %s", err) + } + if diff := cmp.Diff(tt.pkg, tt.override.GoImportPath); diff != "" { + t.Errorf("package mismatch;\n%s", diff) + } + if diff := cmp.Diff(tt.typeName, tt.override.GoTypeName); diff != "" { + t.Errorf("type name mismatch;\n%s", diff) + } + if diff := cmp.Diff(tt.basic, tt.override.GoBasicType); diff != "" { + t.Errorf("basic mismatch;\n%s", diff) + } + }) + } + for _, test := range []struct { + override Override + err string + }{ + { + Override{ + DBType: "uuid", + GoType: GoType{Spec: "Pointer"}, + }, + "Package override `go_type` specifier \"Pointer\" is not a Go basic type e.g. 'string'", + }, + { + Override{ + DBType: "uuid", + GoType: GoType{Spec: "untyped rune"}, + }, + "Package override `go_type` specifier \"untyped rune\" is not a Go basic type e.g. 'string'", + }, + } { + tt := test + t.Run(tt.override.GoType.Spec, func(t *testing.T) { + err := tt.override.parse(nil) + if err == nil { + t.Fatalf("expected parse to fail; got nil") + } + if diff := cmp.Diff(tt.err, err.Error()); diff != "" { + t.Errorf("error mismatch;\n%s", diff) + } + }) + } +} + +func FuzzOverride(f *testing.F) { + for _, spec := range []string{ + "string", + "github.com/gofrs/uuid.UUID", + "github.com/segmentio/ksuid.KSUID", + } { + f.Add(spec) + } + f.Fuzz(func(t *testing.T, s string) { + o := Override{ + GoType: GoType{Spec: s}, + } + o.parse(nil) + }) +} diff --git a/internal/codegen/golang/opts/shim.go b/internal/codegen/golang/opts/shim.go new file mode 100644 index 0000000000..7912e17664 --- /dev/null +++ b/internal/codegen/golang/opts/shim.go @@ -0,0 +1,77 @@ +package opts + +import ( + "strings" + + "github.com/sqlc-dev/sqlc/internal/plugin" +) + +// The ShimOverride struct exists to bridge the gap between the Override struct +// and the previous Override struct defined in codegen.proto. Eventually these +// shim structs should be removed in favor of using the existing Override and +// GoType structs, but it's easier to provide these shim structs to not change +// the existing, working code. +type ShimOverride struct { + DbType string + Nullable bool + Column string + Table *plugin.Identifier + ColumnName string + Unsigned bool + GoType *ShimGoType +} + +func shimOverride(req *plugin.GenerateRequest, o *Override) *ShimOverride { + var column string + var table plugin.Identifier + + if o.Column != "" { + colParts := strings.Split(o.Column, ".") + switch len(colParts) { + case 2: + table.Schema = req.Catalog.DefaultSchema + table.Name = colParts[0] + column = colParts[1] + case 3: + table.Schema = colParts[0] + table.Name = colParts[1] + column = colParts[2] + case 4: + table.Catalog = colParts[0] + table.Schema = colParts[1] + table.Name = colParts[2] + column = colParts[3] + } + } + return &ShimOverride{ + DbType: o.DBType, + Nullable: o.Nullable, + Unsigned: o.Unsigned, + Column: o.Column, + ColumnName: column, + Table: &table, + GoType: shimGoType(o), + } +} + +type ShimGoType struct { + ImportPath string + Package string + TypeName string + BasicType bool + StructTags map[string]string +} + +func shimGoType(o *Override) *ShimGoType { + // Note that there is a slight mismatch between this and the + // proto api. The GoType on the override is the unparsed type, + // which could be a qualified path or an object, as per + // https://docs.sqlc.dev/en/v1.18.0/reference/config.html#type-overriding + return &ShimGoType{ + ImportPath: o.GoImportPath, + Package: o.GoPackage, + TypeName: o.GoTypeName, + BasicType: o.GoBasicType, + StructTags: o.GoStructTags, + } +} diff --git a/internal/codegen/golang/postgresql_type.go b/internal/codegen/golang/postgresql_type.go index 54a7f02d44..398d01e2e8 100644 --- a/internal/codegen/golang/postgresql_type.go +++ b/internal/codegen/golang/postgresql_type.go @@ -5,6 +5,7 @@ import ( "log" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/plugin" @@ -33,7 +34,7 @@ func parseIdentifierString(name string) (*plugin.Identifier, error) { } } -func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) string { +func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { columnType := sdk.DataType(col.Type) notNull := col.NotNull || col.IsArray driver := parseDriver(options.SqlPackage) @@ -47,7 +48,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*int32" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Int4" } return "sql.NullInt32" @@ -59,7 +60,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*int64" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Int8" } return "sql.NullInt64" @@ -71,7 +72,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*int16" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Int2" } return "sql.NullInt16" @@ -83,7 +84,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*int32" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Int4" } return "sql.NullInt32" @@ -95,7 +96,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*int64" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Int8" } return "sql.NullInt64" @@ -107,7 +108,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*int16" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Int2" } return "sql.NullInt16" @@ -119,7 +120,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*float64" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Float8" } return "sql.NullFloat64" @@ -131,7 +132,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*float32" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Float4" } return "sql.NullFloat64" // TODO: Change to sql.NullFloat32 after updating the go.mod file @@ -159,18 +160,18 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*bool" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Bool" } return "sql.NullBool" - case "json": + case "json", "pg_catalog.json": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "[]byte" - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.JSON" - case SQLDriverLibPQ: + case opts.SQLDriverLibPQ: if notNull { return "json.RawMessage" } else { @@ -180,13 +181,13 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) return "interface{}" } - case "jsonb": + case "jsonb", "pg_catalog.jsonb": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "[]byte" - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.JSONB" - case SQLDriverLibPQ: + case opts.SQLDriverLibPQ: if notNull { return "json.RawMessage" } else { @@ -200,7 +201,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) return "[]byte" case "date": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Date" } if notNull { @@ -212,7 +213,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) return "sql.NullTime" case "pg_catalog.time": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Time" } if notNull { @@ -232,8 +233,8 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) } return "sql.NullTime" - case "pg_catalog.timestamp": - if driver == SQLDriverPGXV5 { + case "pg_catalog.timestamp", "timestamp": + if driver == opts.SQLDriverPGXV5 { return "pgtype.Timestamp" } if notNull { @@ -245,7 +246,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) return "sql.NullTime" case "pg_catalog.timestamptz", "timestamptz": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Timestamptz" } if notNull { @@ -263,13 +264,13 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*string" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Text" } return "sql.NullString" case "uuid": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.UUID" } if notNull { @@ -282,14 +283,14 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "inet": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: if notNull { return "netip.Addr" } return "*netip.Addr" - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Inet" - case SQLDriverLibPQ: + case opts.SQLDriverLibPQ: return "pqtype.Inet" default: return "interface{}" @@ -297,14 +298,14 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "cidr": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: if notNull { return "netip.Prefix" } return "*netip.Prefix" - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.CIDR" - case SQLDriverLibPQ: + case opts.SQLDriverLibPQ: return "pqtype.CIDR" default: return "interface{}" @@ -312,11 +313,11 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "macaddr", "macaddr8": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "net.HardwareAddr" - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Macaddr" - case SQLDriverLibPQ: + case opts.SQLDriverLibPQ: return "pqtype.Macaddr" default: return "interface{}" @@ -334,13 +335,13 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if emitPointersForNull { return "*string" } - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Text" } return "sql.NullString" case "interval", "pg_catalog.interval": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Interval" } if notNull { @@ -353,9 +354,9 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "daterange": switch driver { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Daterange" - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Date]" default: return "interface{}" @@ -363,7 +364,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "datemultirange": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Date]]" default: return "interface{}" @@ -371,9 +372,9 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "tsrange": switch driver { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Tsrange" - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Timestamp]" default: return "interface{}" @@ -381,7 +382,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "tsmultirange": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Timestamp]]" default: return "interface{}" @@ -389,9 +390,9 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "tstzrange": switch driver { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Tstzrange" - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Timestamptz]" default: return "interface{}" @@ -399,7 +400,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "tstzmultirange": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Timestamptz]]" default: return "interface{}" @@ -407,9 +408,9 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "numrange": switch driver { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Numrange" - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Numeric]" default: return "interface{}" @@ -417,7 +418,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "nummultirange": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Numeric]]" default: return "interface{}" @@ -425,9 +426,9 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "int4range": switch driver { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Int4range" - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Int4]" default: return "interface{}" @@ -435,7 +436,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "int4multirange": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Int4]]" default: return "interface{}" @@ -443,9 +444,9 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "int8range": switch driver { - case SQLDriverPGXV4: + case opts.SQLDriverPGXV4: return "pgtype.Int8range" - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Int8]" default: return "interface{}" @@ -453,7 +454,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) case "int8multirange": switch driver { - case SQLDriverPGXV5: + case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Int8]]" default: return "interface{}" @@ -466,26 +467,26 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) return "interface{}" case "bit", "varbit", "pg_catalog.bit", "pg_catalog.varbit": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Bits" } - if driver == SQLDriverPGXV4 { + if driver == opts.SQLDriverPGXV4 { return "pgtype.Varbit" } case "cid": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Uint32" } - if driver == SQLDriverPGXV4 { + if driver == opts.SQLDriverPGXV4 { return "pgtype.CID" } case "oid": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Uint32" } - if driver == SQLDriverPGXV4 { + if driver == opts.SQLDriverPGXV4 { return "pgtype.OID" } @@ -495,10 +496,10 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) } case "xid": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { return "pgtype.Uint32" } - if driver == SQLDriverPGXV4 { + if driver == opts.SQLDriverPGXV4 { return "pgtype.XID" } @@ -538,7 +539,7 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) } case "vector": - if driver == SQLDriverPGXV5 { + if driver == opts.SQLDriverPGXV5 { if emitPointersForNull { return "*pgvector.Vector" } else { @@ -572,14 +573,14 @@ func postgresType(req *plugin.CodeGenRequest, options *opts, col *plugin.Column) if rel.Name == enum.Name && rel.Schema == schema.Name { if notNull { if schema.Name == req.Catalog.DefaultSchema { - return StructName(enum.Name, req.Settings) + return StructName(enum.Name, options) } - return StructName(schema.Name+"_"+enum.Name, req.Settings) + return StructName(schema.Name+"_"+enum.Name, options) } else { if schema.Name == req.Catalog.DefaultSchema { - return "Null" + StructName(enum.Name, req.Settings) + return "Null" + StructName(enum.Name, options) } - return "Null" + StructName(schema.Name+"_"+enum.Name, req.Settings) + return "Null" + StructName(schema.Name+"_"+enum.Name, options) } } } diff --git a/internal/codegen/golang/query.go b/internal/codegen/golang/query.go index b82178686c..3b4fb2fa1a 100644 --- a/internal/codegen/golang/query.go +++ b/internal/codegen/golang/query.go @@ -4,6 +4,7 @@ import ( "fmt" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/plugin" ) @@ -15,7 +16,7 @@ type QueryValue struct { DBName string // The name of the field in the database. Only set if Struct==nil. Struct *Struct Typ string - SQLDriver SQLDriver + SQLDriver opts.SQLDriver // Column is kept so late in the generation process around to differentiate // between mysql slices and pg arrays diff --git a/internal/codegen/golang/reserved.go b/internal/codegen/golang/reserved.go index fee711c57b..0461c4a2de 100644 --- a/internal/codegen/golang/reserved.go +++ b/internal/codegen/golang/reserved.go @@ -59,6 +59,8 @@ func IsReserved(s string) bool { return true case "var": return true + case "q": + return true default: return false } diff --git a/internal/codegen/golang/result.go b/internal/codegen/golang/result.go index 03e2d21fcd..515d0a654f 100644 --- a/internal/codegen/golang/result.go +++ b/internal/codegen/golang/result.go @@ -1,17 +1,19 @@ package golang import ( + "bufio" "fmt" "sort" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/inflection" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/plugin" ) -func buildEnums(req *plugin.CodeGenRequest, options *opts) []Enum { +func buildEnums(req *plugin.GenerateRequest, options *opts.Options) []Enum { var enums []Enum for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { @@ -26,7 +28,7 @@ func buildEnums(req *plugin.CodeGenRequest, options *opts) []Enum { } e := Enum{ - Name: StructName(enumName, req.Settings), + Name: StructName(enumName, options), Comment: enum.Comment, NameTags: map[string]string{}, ValidTags: map[string]string{}, @@ -43,7 +45,7 @@ func buildEnums(req *plugin.CodeGenRequest, options *opts) []Enum { value = fmt.Sprintf("value_%d", i) } e.Constants = append(e.Constants, Constant{ - Name: StructName(enumName+"_"+value, req.Settings), + Name: StructName(enumName+"_"+value, options), Value: v, Type: e.Name, }) @@ -58,7 +60,7 @@ func buildEnums(req *plugin.CodeGenRequest, options *opts) []Enum { return enums } -func buildStructs(req *plugin.CodeGenRequest, options *opts) []Struct { +func buildStructs(req *plugin.GenerateRequest, options *opts.Options) []Struct { var structs []Struct for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { @@ -80,7 +82,7 @@ func buildStructs(req *plugin.CodeGenRequest, options *opts) []Struct { } s := Struct{ Table: &plugin.Identifier{Schema: schema.Name, Name: table.Rel.Name}, - Name: StructName(structName, req.Settings), + Name: StructName(structName, options), Comment: table.Comment, } for _, column := range table.Columns { @@ -91,9 +93,9 @@ func buildStructs(req *plugin.CodeGenRequest, options *opts) []Struct { if options.EmitJsonTags { tags["json"] = JSONTagName(column.Name, options) } - addExtraGoStructTags(tags, req, column) + addExtraGoStructTags(tags, req, options, column) s.Fields = append(s.Fields, Field{ - Name: StructName(column.Name, req.Settings), + Name: StructName(column.Name, options), Type: goType(req, options, column), Tags: tags, Comment: column.Comment, @@ -181,7 +183,7 @@ func argName(name string) string { return out } -func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ([]Query, error) { +func buildQueries(req *plugin.GenerateRequest, options *opts.Options, structs []Struct) ([]Query, error) { qs := make([]Query, 0, len(req.Queries)) for _, query := range req.Queries { if query.Name == "" { @@ -198,6 +200,22 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( constantName = sdk.LowerTitle(query.Name) } + comments := query.Comments + if options.EmitSqlAsComment { + if len(comments) == 0 { + comments = append(comments, query.Name) + } + comments = append(comments, " ") + scanner := bufio.NewScanner(strings.NewReader(query.Text)) + for scanner.Scan() { + line := scanner.Text() + comments = append(comments, " "+line) + } + if err := scanner.Err(); err != nil { + return nil, err + } + } + gq := Query{ Cmd: query.Cmd, ConstantName: constantName, @@ -205,7 +223,7 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( MethodName: query.Name, SourceName: query.Filename, SQL: query.Text, - Comments: query.Comments, + Comments: comments, Table: query.InsertIntoTable, } sqlpkg := parseDriver(options.SqlPackage) @@ -241,7 +259,9 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( EmitPointer: options.EmitParamsStructPointers, } - if len(query.Params) <= qpl { + // if query params is 2, and query params limit is 4 AND this is a copyfrom, we still want to emit the query's model + // otherwise we end up with a copyfrom using a struct without the struct definition + if len(query.Params) <= qpl && query.Cmd != ":copyfrom" { gq.Arg.Emit = false } } @@ -267,7 +287,7 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( same := true for i, f := range s.Fields { c := query.Columns[i] - sameName := f.Name == StructName(columnName(c, i), req.Settings) + sameName := f.Name == StructName(columnName(c, i), options) sameType := f.Type == goType(req, options, c) sameTable := sdk.SameTableName(c.Table, s.Table, req.Catalog.DefaultSchema) if !sameName || !sameType || !sameTable { @@ -311,16 +331,16 @@ func buildQueries(req *plugin.CodeGenRequest, options *opts, structs []Struct) ( return qs, nil } +var cmdReturnsData = map[string]struct{}{ + metadata.CmdBatchMany: {}, + metadata.CmdBatchOne: {}, + metadata.CmdMany: {}, + metadata.CmdOne: {}, +} + func putOutColumns(query *plugin.Query) bool { - if len(query.Columns) > 0 { - return true - } - for _, allowed := range []string{metadata.CmdMany, metadata.CmdOne, metadata.CmdBatchMany} { - if query.Cmd == allowed { - return true - } - } - return false + _, found := cmdReturnsData[query.Cmd] + return found } // It's possible that this method will generate duplicate JSON tag values @@ -331,7 +351,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, options *opts, name string, columns []goColumn, useID bool) (*Struct, error) { +func columnsToStruct(req *plugin.GenerateRequest, options *opts.Options, name string, columns []goColumn, useID bool) (*Struct, error) { gs := Struct{ Name: name, } @@ -347,7 +367,7 @@ func columnsToStruct(req *plugin.CodeGenRequest, options *opts, name string, col tagName = SetCaseStyle(colName, "snake") } - fieldName := StructName(colName, req.Settings) + fieldName := StructName(colName, options) baseFieldName := fieldName // Track suffixes by the ID of the column, so that columns referring to the same numbered parameter can be // reused. @@ -369,7 +389,7 @@ func columnsToStruct(req *plugin.CodeGenRequest, options *opts, name string, col if options.EmitJsonTags { tags["json"] = JSONTagName(tagName, options) } - addExtraGoStructTags(tags, req, c.Column) + addExtraGoStructTags(tags, req, options, c.Column) f := Field{ Name: fieldName, DBName: colName, diff --git a/internal/codegen/golang/result_test.go b/internal/codegen/golang/result_test.go index 4156b848e2..0c58525ec3 100644 --- a/internal/codegen/golang/result_test.go +++ b/internal/codegen/golang/result_test.go @@ -50,7 +50,7 @@ func TestPutOutColumns_ForZeroColumns(t *testing.T) { }, { cmd: metadata.CmdBatchOne, - want: false, + want: true, }, } for _, tc := range tests { diff --git a/internal/codegen/golang/sqlite_type.go b/internal/codegen/golang/sqlite_type.go index 2581197fd5..8a22aaa262 100644 --- a/internal/codegen/golang/sqlite_type.go +++ b/internal/codegen/golang/sqlite_type.go @@ -4,14 +4,16 @@ import ( "log" "strings" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/codegen/sdk" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/plugin" ) -func sqliteType(req *plugin.CodeGenRequest, col *plugin.Column) string { +func sqliteType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { dt := strings.ToLower(sdk.DataType(col.Type)) notNull := col.NotNull || col.IsArray + emitPointersForNull := options.EmitPointersForNullTypes switch dt { @@ -19,6 +21,9 @@ func sqliteType(req *plugin.CodeGenRequest, col *plugin.Column) string { if notNull { return "int64" } + if emitPointersForNull { + return "*int64" + } return "sql.NullInt64" case "blob": @@ -28,20 +33,32 @@ func sqliteType(req *plugin.CodeGenRequest, col *plugin.Column) string { if notNull { return "float64" } + if emitPointersForNull { + return "*float64" + } return "sql.NullFloat64" case "boolean", "bool": if notNull { return "bool" } + if emitPointersForNull { + return "*bool" + } return "sql.NullBool" case "date", "datetime", "timestamp": if notNull { return "time.Time" } + if emitPointersForNull { + return "*time.Time" + } return "sql.NullTime" + case "json", "jsonb": + return "json.RawMessage" + case "any": return "interface{}" @@ -60,12 +77,18 @@ func sqliteType(req *plugin.CodeGenRequest, col *plugin.Column) string { if notNull { return "string" } + if emitPointersForNull { + return "*string" + } return "sql.NullString" case strings.HasPrefix(dt, "decimal"), dt == "numeric": if notNull { return "float64" } + if emitPointersForNull { + return "*float64" + } return "sql.NullFloat64" default: diff --git a/internal/codegen/golang/struct.go b/internal/codegen/golang/struct.go index 31904205e1..ed9311800e 100644 --- a/internal/codegen/golang/struct.go +++ b/internal/codegen/golang/struct.go @@ -5,6 +5,7 @@ import ( "unicode" "unicode/utf8" + "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/plugin" ) @@ -15,8 +16,8 @@ type Struct struct { Comment string } -func StructName(name string, settings *plugin.Settings) string { - if rename := settings.Rename[name]; rename != "" { +func StructName(name string, options *opts.Options) string { + if rename := options.Rename[name]; rename != "" { return rename } out := "" @@ -31,8 +32,8 @@ func StructName(name string, settings *plugin.Settings) string { }, name) for _, p := range strings.Split(name, "_") { - if p == "id" { - out += "ID" + if _, found := options.InitialismsMap[p]; found { + out += strings.ToUpper(p) } else { out += strings.Title(p) } diff --git a/internal/codegen/golang/templates/go-sql-driver-mysql/copyfromCopy.tmpl b/internal/codegen/golang/templates/go-sql-driver-mysql/copyfromCopy.tmpl index 3bdc5d5729..e21475b148 100644 --- a/internal/codegen/golang/templates/go-sql-driver-mysql/copyfromCopy.tmpl +++ b/internal/codegen/golang/templates/go-sql-driver-mysql/copyfromCopy.tmpl @@ -9,11 +9,11 @@ func convertRowsFor{{.MethodName}}(w *io.PipeWriter, {{.Arg.SlicePair}}) { {{- with $arg := .Arg }} {{- range $arg.CopyFromMySQLFields}} {{- if eq .Type "string"}} - e.AppendString({{if eq (len $arg.CopyFromMySQLFields) 1}}row{{else}}row.{{.Name}}{{end}}) -{{- else if eq .Type "[]byte"}} - e.AppendBytes({{if eq (len $arg.CopyFromMySQLFields) 1}}row{{else}}row.{{.Name}}{{end}}) + e.AppendString({{if $arg.Struct}}row.{{.Name}}{{else}}row{{end}}) +{{- else if or (eq .Type "[]byte") (eq .Type "json.RawMessage")}} + e.AppendBytes({{if $arg.Struct}}row.{{.Name}}{{else}}row{{end}}) {{- else}} - e.AppendValue({{if eq (len $arg.CopyFromMySQLFields) 1}}row{{else}}row.{{.Name}}{{end}}) + e.AppendValue({{if $arg.Struct}}row.{{.Name}}{{else}}row{{end}}) {{- end}} {{- end}} {{- end}} diff --git a/internal/codegen/golang/templates/pgx/batchCode.tmpl b/internal/codegen/golang/templates/pgx/batchCode.tmpl index 93cdad48a3..35bd701bd3 100644 --- a/internal/codegen/golang/templates/pgx/batchCode.tmpl +++ b/internal/codegen/golang/templates/pgx/batchCode.tmpl @@ -16,7 +16,7 @@ type {{.MethodName}}BatchResults struct { closed bool } -{{if .Arg.EmitStruct}} +{{if .Arg.Struct}} type {{.Arg.Type}} struct { {{- range .Arg.Struct.Fields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} diff --git a/internal/codegen/golang/templates/pgx/queryCode.tmpl b/internal/codegen/golang/templates/pgx/queryCode.tmpl index 18de5db2ba..59a88c880a 100644 --- a/internal/codegen/golang/templates/pgx/queryCode.tmpl +++ b/internal/codegen/golang/templates/pgx/queryCode.tmpl @@ -37,6 +37,11 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ({{.Ret.De var {{.Ret.Name}} {{.Ret.Type}} {{- end}} err := row.Scan({{.Ret.Scan}}) + {{- if $.WrapErrors}} + if err != nil { + err = fmt.Errorf("query {{.MethodName}}: %w", err) + } + {{- end}} return {{.Ret.ReturnName}}, err } {{end}} @@ -52,7 +57,7 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret. rows, err := q.db.Query(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} if err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } defer rows.Close() {{- if $.EmitEmptySlices}} @@ -63,12 +68,12 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret. for rows.Next() { var {{.Ret.Name}} {{.Ret.Type}} if err := rows.Scan({{.Ret.Scan}}); err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } items = append(items, {{.Ret.ReturnName}}) } if err := rows.Err(); err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return items, nil } @@ -84,7 +89,14 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) e func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) error { _, err := q.db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} + {{- if $.WrapErrors }} + if err != nil { + return fmt.Errorf("query {{.MethodName}}: %w", err) + } + return nil + {{- else }} return err + {{- end }} } {{end}} @@ -99,7 +111,7 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, er result, err := q.db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} if err != nil { - return 0, err + return 0, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return result.RowsAffected(), nil } @@ -110,11 +122,17 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, er {{end -}} {{- if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (pgconn.CommandTag, error) { - return db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) + {{queryRetval .}} db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- else -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (pgconn.CommandTag, error) { - return q.db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) + {{queryRetval .}} q.db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} + {{- if $.WrapErrors}} + if err != nil { + err = fmt.Errorf("query {{.MethodName}}: %w", err) + } + return result, err + {{- end}} } {{end}} diff --git a/internal/codegen/golang/templates/stdlib/queryCode.tmpl b/internal/codegen/golang/templates/stdlib/queryCode.tmpl index cf56000ec6..1e7f4e22a4 100644 --- a/internal/codegen/golang/templates/stdlib/queryCode.tmpl +++ b/internal/codegen/golang/templates/stdlib/queryCode.tmpl @@ -28,6 +28,11 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} var {{.Ret.Name}} {{.Ret.Type}} {{- end}} err := row.Scan({{.Ret.Scan}}) + {{- if $.WrapErrors}} + if err != nil { + err = fmt.Errorf("query {{.MethodName}}: %w", err) + } + {{- end}} return {{.Ret.ReturnName}}, err } {{end}} @@ -38,7 +43,7 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) { {{- template "queryCodeStdExec" . }} if err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } defer rows.Close() {{- if $.EmitEmptySlices}} @@ -49,15 +54,15 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} for rows.Next() { var {{.Ret.Name}} {{.Ret.Type}} if err := rows.Scan({{.Ret.Scan}}); err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } items = append(items, {{.Ret.ReturnName}}) } if err := rows.Close(); err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } if err := rows.Err(); err != nil { - return nil, err + return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return items, nil } @@ -68,6 +73,11 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) error { {{- template "queryCodeStdExec" . }} + {{- if $.WrapErrors}} + if err != nil { + err = fmt.Errorf("query {{.MethodName}}: %w", err) + } + {{- end}} return err } {{end}} @@ -78,7 +88,7 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) (int64, error) { {{- template "queryCodeStdExec" . }} if err != nil { - return 0, err + return 0, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return result.RowsAffected() } @@ -90,7 +100,7 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) (int64, error) { {{- template "queryCodeStdExec" . }} if err != nil { - return 0, err + return 0, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return result.LastInsertId() } @@ -101,6 +111,12 @@ func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) (sql.Result, error) { {{- template "queryCodeStdExec" . }} + {{- if $.WrapErrors}} + if err != nil { + err = fmt.Errorf("query {{.MethodName}}: %w", err) + } + return result, err + {{- end}} } {{end}} diff --git a/internal/codegen/golang/templates/template.tmpl b/internal/codegen/golang/templates/template.tmpl index 29f29801c6..afd50c01ac 100644 --- a/internal/codegen/golang/templates/template.tmpl +++ b/internal/codegen/golang/templates/template.tmpl @@ -3,17 +3,20 @@ //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. -// versions: +{{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} +{{end}} package {{.Package}} +{{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) +{{end}} {{template "dbCode" . }} {{end}} @@ -33,17 +36,20 @@ import ( //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. -// versions: +{{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} +{{end}} package {{.Package}} +{{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) +{{end}} {{template "interfaceCode" . }} {{end}} @@ -61,17 +67,20 @@ import ( //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. -// versions: +{{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} +{{end}} package {{.Package}} +{{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) +{{end}} {{template "modelsCode" . }} {{end}} @@ -158,18 +167,20 @@ type {{.Name}} struct { {{- range .Fields}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. -// versions: +{{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} -// source: {{.SourceName}} +{{end}}// source: {{.SourceName}} package {{.Package}} +{{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) +{{end}} {{template "queryCode" . }} {{end}} @@ -187,18 +198,20 @@ import ( //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. -// versions: +{{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} -// source: {{.SourceName}} +{{end}}// source: {{.SourceName}} package {{.Package}} +{{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) +{{end}} {{template "copyfromCode" . }} {{end}} @@ -216,18 +229,21 @@ import ( //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. -// versions: +{{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} -// source: {{.SourceName}} +{{end}}// source: {{.SourceName}} package {{.Package}} +{{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) +{{end}} + {{template "batchCode" . }} {{end}} diff --git a/internal/codegen/json/gen.go b/internal/codegen/json/gen.go index b7e4057780..ad797efd92 100644 --- a/internal/codegen/json/gen.go +++ b/internal/codegen/json/gen.go @@ -11,7 +11,7 @@ import ( "github.com/sqlc-dev/sqlc/internal/plugin" ) -func parseOptions(req *plugin.CodeGenRequest) (*opts, error) { +func parseOptions(req *plugin.GenerateRequest) (*opts, error) { if len(req.PluginOptions) == 0 { return new(opts), nil } @@ -25,7 +25,7 @@ func parseOptions(req *plugin.CodeGenRequest) (*opts, error) { return options, nil } -func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { +func Generate(ctx context.Context, req *plugin.GenerateRequest) (*plugin.GenerateResponse, error) { options, err := parseOptions(req) if err != nil { return nil, err @@ -57,7 +57,7 @@ func Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenR if err != nil { return nil, err } - return &plugin.CodeGenResponse{ + return &plugin.GenerateResponse{ Files: []*plugin.File{ { Name: filename, diff --git a/internal/codegen/sdk/sdk.go b/internal/codegen/sdk/sdk.go index 415cbaaec5..53e3fc6a9f 100644 --- a/internal/codegen/sdk/sdk.go +++ b/internal/codegen/sdk/sdk.go @@ -21,32 +21,6 @@ func MatchString(pat, target string) bool { return matcher.MatchString(target) } -func Matches(o *plugin.Override, n *plugin.Identifier, defaultSchema string) bool { - if n == nil { - return false - } - schema := n.Schema - if n.Schema == "" { - schema = defaultSchema - } - if o.Table.Catalog != "" && !MatchString(o.Table.Catalog, n.Catalog) { - return false - } - if o.Table.Schema == "" && schema != "" { - return false - } - if o.Table.Schema != "" && !MatchString(o.Table.Schema, schema) { - return false - } - if o.Table.Name == "" && n.Name != "" { - return false - } - if o.Table.Name != "" && !MatchString(o.Table.Name, n.Name) { - return false - } - return true -} - func SameTableName(tableID, f *plugin.Identifier, defaultSchema string) bool { if tableID == nil { return false diff --git a/internal/codegen/sdk/utils.go b/internal/codegen/sdk/utils.go index 1dffda9e7e..ec4a4e5ab4 100644 --- a/internal/codegen/sdk/utils.go +++ b/internal/codegen/sdk/utils.go @@ -23,12 +23,14 @@ func Title(s string) string { // a backtick, replace it the following way: // // input: -// SELECT `group` FROM foo +// +// SELECT `group` FROM foo // // output: -// SELECT ` + "`" + `group` + "`" + ` FROM foo // -// The escaped string must be rendered inside an existing string literal +// SELECT ` + "`" + `group` + "`" + ` FROM foo +// +// # The escaped string must be rendered inside an existing string literal // // A string cannot be escaped twice func EscapeBacktick(s string) string { diff --git a/internal/compiler/analyze.go b/internal/compiler/analyze.go index 82a67fb6f2..38d66fce19 100644 --- a/internal/compiler/analyze.go +++ b/internal/compiler/analyze.go @@ -135,10 +135,6 @@ func (c *Compiler) _analyzeQuery(raw *ast.RawStmt, query string, failfast bool) 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 @@ -148,15 +144,6 @@ func (c *Compiler) _analyzeQuery(raw *ast.RawStmt, query string, failfast bool) 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 { diff --git a/internal/compiler/compile.go b/internal/compiler/compile.go index 19b737257c..84fbb20a3c 100644 --- a/internal/compiler/compile.go +++ b/internal/compiler/compile.go @@ -79,9 +79,6 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { } for _, stmt := range stmts { query, err := c.parseQuery(stmt.Raw, src, o) - if err == ErrUnsupportedStatementType { - continue - } if err != nil { var e *sqlerr.Error loc := stmt.Raw.Pos() @@ -95,6 +92,10 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { } continue } + if query == nil { + continue + } + query.Metadata.Filename = filepath.Base(filename) queryName := query.Metadata.Name if queryName != "" { if _, exists := set[queryName]; exists { @@ -103,10 +104,7 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { } set[queryName] = struct{}{} } - query.Metadata.Filename = filepath.Base(filename) - if query != nil { - q = append(q, query) - } + q = append(q, query) } } if len(merr.Errs()) > 0 { diff --git a/internal/compiler/engine.go b/internal/compiler/engine.go index e7e11152c4..f742bfd999 100644 --- a/internal/compiler/engine.go +++ b/internal/compiler/engine.go @@ -6,13 +6,12 @@ import ( "github.com/sqlc-dev/sqlc/internal/analyzer" "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/dbmanager" "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" ) @@ -23,7 +22,8 @@ type Compiler struct { parser Parser result *Result analyzer analyzer.Analyzer - client pb.QuickClient + client dbmanager.Client + selector selector schema []string } @@ -32,10 +32,7 @@ func NewCompiler(conf config.SQL, combo config.CombinedSettings) (*Compiler, err 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) - } + client := dbmanager.NewClient(combo.Global.Servers) c.client = client } @@ -43,12 +40,15 @@ func NewCompiler(conf config.SQL, combo config.CombinedSettings) (*Compiler, err case config.EngineSQLite: c.parser = sqlite.NewParser() c.catalog = sqlite.NewCatalog() + c.selector = newSQLiteSelector() case config.EngineMySQL: c.parser = dolphin.NewParser() c.catalog = dolphin.NewCatalog() + c.selector = newDefaultSelector() case config.EnginePostgreSQL: c.parser = postgresql.NewParser() c.catalog = postgresql.NewCatalog() + c.selector = newDefaultSelector() if conf.Database != nil { if conf.Analyzer.Database == nil || *conf.Analyzer.Database { c.analyzer = analyzer.Cached( @@ -89,4 +89,7 @@ func (c *Compiler) Close(ctx context.Context) { if c.analyzer != nil { c.analyzer.Close(ctx) } + if c.client != nil { + c.client.Close(ctx) + } } diff --git a/internal/compiler/expand.go b/internal/compiler/expand.go index 60e654b696..c60b7618b2 100644 --- a/internal/compiler/expand.go +++ b/internal/compiler/expand.go @@ -149,6 +149,11 @@ func (c *Compiler) expandStmt(qc *QueryCatalog, raw *ast.RawStmt, node ast.Node) if counts[cname] > 1 { cname = tableName + "." + cname } + + // This is important for SQLite in particular which needs to + // wrap jsonb column values with `json(colname)` so they're in a + // publicly usable format (i.e. not jsonb). + cname = c.selector.ColumnExpr(cname, column) cols = append(cols, cname) } } diff --git a/internal/compiler/find_params.go b/internal/compiler/find_params.go index ca38199b9d..8199addd33 100644 --- a/internal/compiler/find_params.go +++ b/internal/compiler/find_params.go @@ -195,7 +195,7 @@ func (p paramSearch) Visit(node ast.Node) astutils.Visitor { if n.Sel == nil { p.parent = node } else { - if sel, ok := n.Sel.(*ast.SelectStmt); ok && sel.FromClause != nil { + if sel, ok := n.Sel.(*ast.SelectStmt); ok && sel.FromClause != nil && len(sel.FromClause.Items) > 0 { from := sel.FromClause if schema, ok := from.Items[0].(*ast.RangeVar); ok && schema != nil { p.rangeVar = &ast.RangeVar{ diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index 49b1661376..b0a15e6ac4 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -57,7 +57,7 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er return nil, err } - var targets *ast.List + targets := &ast.List{} switch n := node.(type) { case *ast.DeleteStmt: targets = n.ReturningList @@ -114,16 +114,8 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er if isUnion { return c.outputColumns(qc, n.Larg) } - case *ast.DoStmt: - targets = &ast.List{} - case *ast.CallStmt: - targets = &ast.List{} - case *ast.TruncateStmt, *ast.RefreshMatViewStmt, *ast.NotifyStmt, *ast.ListenStmt: - targets = &ast.List{} case *ast.UpdateStmt: targets = n.ReturningList - default: - return nil, fmt.Errorf("outputColumns: unsupported node type: %T", n) } var cols []*Column @@ -158,11 +150,11 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er if res.Name != nil { name = *res.Name } - switch { - case lang.IsComparisonOperator(astutils.Join(n.Name, "")): + switch op := astutils.Join(n.Name, ""); { + case lang.IsComparisonOperator(op): // TODO: Generate a name for these operations cols = append(cols, &Column{Name: name, DataType: "bool", NotNull: true}) - case lang.IsMathematicalOperator(astutils.Join(n.Name, "")): + case lang.IsMathematicalOperator(op): cols = append(cols, &Column{Name: name, DataType: "int", NotNull: true}) default: cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) @@ -487,7 +479,7 @@ func (r *tableVisitor) Visit(n ast.Node) astutils.Visitor { // Return an error if a table is referenced twice // Return an error if an unknown column is referenced func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, error) { - var list *ast.List + list := &ast.List{} switch n := node.(type) { case *ast.DeleteStmt: list = n.Relations @@ -514,14 +506,6 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro astutils.Walk(&tv, n.FromClause) astutils.Walk(&tv, n.Relations) list = &tv.list - case *ast.DoStmt: - list = &ast.List{} - case *ast.CallStmt: - list = &ast.List{} - case *ast.NotifyStmt, *ast.ListenStmt: - list = &ast.List{} - default: - return nil, fmt.Errorf("sourceTables: unsupported node type: %T", n) } var tables []*Table @@ -612,9 +596,15 @@ func (c *Compiler) sourceTables(qc *QueryCatalog, node ast.Node) ([]*Table, erro if err != nil { return nil, err } + + var tableName string + if n.Alias != nil { + tableName = *n.Alias.Aliasname + } + tables = append(tables, &Table{ Rel: &ast.TableName{ - Name: *n.Alias.Aliasname, + Name: tableName, }, Columns: cols, }) diff --git a/internal/compiler/parse.go b/internal/compiler/parse.go index b47a72beef..681d291122 100644 --- a/internal/compiler/parse.go +++ b/internal/compiler/parse.go @@ -15,8 +15,6 @@ import ( "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() @@ -48,6 +46,10 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, return nil, err } + if name == "" { + return nil, nil + } + if err := validate.Cmd(raw.Stmt, name, cmd); err != nil { return nil, err } @@ -63,7 +65,7 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, return nil, err } - md.Params, md.Flags, err = metadata.ParseParamsAndFlags(cleanedComments) + md.Params, md.Flags, md.RuleSkiplist, err = metadata.ParseCommentFlags(cleanedComments) if err != nil { return nil, err } diff --git a/internal/compiler/resolve.go b/internal/compiler/resolve.go index 508c5600f6..b1fbb1990e 100644 --- a/internal/compiler/resolve.go +++ b/internal/compiler/resolve.go @@ -98,6 +98,20 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, } var a []Parameter + + addUnknownParam := func(ref paramRef) { + 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, + }, + }) + } + for _, ref := range args { switch n := ref.parent.(type) { @@ -145,7 +159,7 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, // TODO: Move this to database-specific engine package dataType := "any" if astutils.Join(n.Name, ".") == "||" { - dataType = "string" + dataType = "text" } defaultP := named.NewParam("") @@ -173,6 +187,10 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, case 2: alias = items[0] key = items[1] + case 3: + // schema := items[0] + alias = items[1] + key = items[2] default: panic("too many field items: " + strconv.Itoa(len(items))) } @@ -314,6 +332,8 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, ReturnType: &ast.TypeName{Name: "any"}, } } + + var added bool for i, item := range n.Args.Items { funcName := fun.Name var argName string @@ -353,6 +373,7 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, defaultP := named.NewInferredParam(defaultName, false) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) + added = true a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ @@ -394,6 +415,7 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, defaultP := named.NewInferredParam(paramName, true) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) + added = true a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ @@ -407,6 +429,9 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, } if fun.ReturnType == nil { + if !added { + addUnknownParam(ref) + } continue } @@ -416,7 +441,9 @@ func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, Name: fun.ReturnType.Name, }) if err != nil { - // The return type wasn't a table. + if !added { + addUnknownParam(ref) + } continue } err = indexTable(table) @@ -603,16 +630,7 @@ 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, - }, - }) + addUnknownParam(ref) } } return a, nil diff --git a/internal/compiler/selector.go b/internal/compiler/selector.go new file mode 100644 index 0000000000..04d118ff9c --- /dev/null +++ b/internal/compiler/selector.go @@ -0,0 +1,46 @@ +package compiler + +// selector is an interface used by a compiler for generating expressions for +// output columns in a `SELECT ...` or `RETURNING ...` statement. +// +// This interface is exclusively needed at the moment for SQLite, which must +// wrap output `jsonb` columns with a `json(column_name)` invocation so that a +// publicly consumable format (i.e. not jsonb) is returned. +type selector interface { + // ColumnExpr generates output to be used in a `SELECT ...` or `RETURNING + // ...` statement based on input column name and metadata. + ColumnExpr(name string, column *Column) string +} + +// defaultSelector is a selector implementation that does the simpliest possible +// pass through when generating column expressions. Its use is suitable for all +// database engines not requiring additional customization. +type defaultSelector struct{} + +func newDefaultSelector() *defaultSelector { + return &defaultSelector{} +} + +func (s *defaultSelector) ColumnExpr(name string, column *Column) string { + return name +} + +type sqliteSelector struct{} + +func newSQLiteSelector() *sqliteSelector { + return &sqliteSelector{} +} + +func (s *sqliteSelector) ColumnExpr(name string, column *Column) string { + // Under SQLite, neither json nor jsonb are real data types, and rather just + // of type blob, so database drivers just return whatever raw binary is + // stored as values. This is a problem for jsonb, which is considered an + // internal format to SQLite and no attempt should be made to parse it + // outside of the database itself. For jsonb columns in SQLite, wrap values + // in `json(col)` to coerce the internal binary format to JSON parsable by + // the user-space application. + if column.DataType == "jsonb" { + return "json(" + name + ")" + } + return name +} diff --git a/internal/compiler/selector_test.go b/internal/compiler/selector_test.go new file mode 100644 index 0000000000..e460dd281c --- /dev/null +++ b/internal/compiler/selector_test.go @@ -0,0 +1,35 @@ +package compiler + +import "testing" + +func TestSelector(t *testing.T) { + t.Parallel() + + selectorExpectColumnExpr := func(t *testing.T, selector selector, expected, name string, column *Column) { + if actual := selector.ColumnExpr(name, column); expected != actual { + t.Errorf("Expected %v, got %v for data type %v", expected, actual, column.DataType) + } + } + + t.Run("DefaultSelectorColumnExpr", func(t *testing.T) { + t.Parallel() + + selector := newDefaultSelector() + + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "integer"}) + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "json"}) + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "jsonb"}) + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "text"}) + }) + + t.Run("SQLiteSelectorColumnExpr", func(t *testing.T) { + t.Parallel() + + selector := newSQLiteSelector() + + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "integer"}) + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "json"}) + selectorExpectColumnExpr(t, selector, "json(my_column)", "my_column", &Column{DataType: "jsonb"}) + selectorExpectColumnExpr(t, selector, "my_column", "my_column", &Column{DataType: "text"}) + }) +} diff --git a/internal/config/config.go b/internal/config/config.go index 8bd1f004f4..0ff805fccd 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -7,6 +7,8 @@ import ( "io" "gopkg.in/yaml.v3" + + golang "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" ) type versionSetting struct { @@ -55,12 +57,20 @@ const ( ) type Config struct { - Version string `json:"version" yaml:"version"` - Cloud Cloud `json:"cloud" yaml:"cloud"` - SQL []SQL `json:"sql" yaml:"sql"` - Gen Gen `json:"overrides,omitempty" yaml:"overrides"` - Plugins []Plugin `json:"plugins" yaml:"plugins"` - Rules []Rule `json:"rules" yaml:"rules"` + Version string `json:"version" yaml:"version"` + Cloud Cloud `json:"cloud" yaml:"cloud"` + Servers []Server `json:"servers" yaml:"servers"` + SQL []SQL `json:"sql" yaml:"sql"` + Overrides Overrides `json:"overrides,omitempty" yaml:"overrides"` + Plugins []Plugin `json:"plugins" yaml:"plugins"` + Rules []Rule `json:"rules" yaml:"rules"` + Options map[string]yaml.Node `json:"options" yaml:"options"` +} + +type Server struct { + Name string `json:"name,omitempty" yaml:"name"` + Engine Engine `json:"engine,omitempty" yaml:"engine"` + URI string `json:"uri" yaml:"uri"` } type Database struct { @@ -79,7 +89,8 @@ type Plugin struct { Name string `json:"name" yaml:"name"` Env []string `json:"env" yaml:"env"` Process *struct { - Cmd string `json:"cmd" yaml:"cmd"` + Cmd string `json:"cmd" yaml:"cmd"` + Format string `json:"format" yaml:"format"` } `json:"process" yaml:"process"` WASM *struct { URL string `json:"url" yaml:"url"` @@ -93,13 +104,8 @@ type Rule struct { Msg string `json:"message" yaml:"message"` } -type Gen struct { - Go *GenGo `json:"go,omitempty" yaml:"go"` -} - -type GenGo struct { - Overrides []Override `json:"overrides,omitempty" yaml:"overrides"` - Rename map[string]string `json:"rename,omitempty" yaml:"rename"` +type Overrides struct { + Go *golang.GlobalOptions `json:"go,omitempty" yaml:"go"` } type SQL struct { @@ -128,42 +134,8 @@ type Codegen struct { } type SQLGen struct { - Go *SQLGo `json:"go,omitempty" yaml:"go"` - JSON *SQLJSON `json:"json,omitempty" yaml:"json"` -} - -type SQLGo struct { - EmitInterface bool `json:"emit_interface" yaml:"emit_interface"` - EmitJSONTags bool `json:"emit_json_tags" yaml:"emit_json_tags"` - JsonTagsIDUppercase bool `json:"json_tags_id_uppercase" yaml:"json_tags_id_uppercase"` - EmitDBTags bool `json:"emit_db_tags" yaml:"emit_db_tags"` - EmitPreparedQueries bool `json:"emit_prepared_queries" yaml:"emit_prepared_queries"` - EmitExactTableNames bool `json:"emit_exact_table_names,omitempty" yaml:"emit_exact_table_names"` - EmitEmptySlices bool `json:"emit_empty_slices,omitempty" yaml:"emit_empty_slices"` - EmitExportedQueries bool `json:"emit_exported_queries" yaml:"emit_exported_queries"` - EmitResultStructPointers bool `json:"emit_result_struct_pointers" yaml:"emit_result_struct_pointers"` - EmitParamsStructPointers bool `json:"emit_params_struct_pointers" yaml:"emit_params_struct_pointers"` - EmitMethodsWithDBArgument bool `json:"emit_methods_with_db_argument,omitempty" yaml:"emit_methods_with_db_argument"` - EmitPointersForNullTypes bool `json:"emit_pointers_for_null_types" yaml:"emit_pointers_for_null_types"` - EmitEnumValidMethod bool `json:"emit_enum_valid_method,omitempty" yaml:"emit_enum_valid_method"` - EmitAllEnumValues bool `json:"emit_all_enum_values,omitempty" yaml:"emit_all_enum_values"` - JSONTagsCaseStyle string `json:"json_tags_case_style,omitempty" yaml:"json_tags_case_style"` - Package string `json:"package" yaml:"package"` - Out string `json:"out" yaml:"out"` - Overrides []Override `json:"overrides,omitempty" yaml:"overrides"` - Rename map[string]string `json:"rename,omitempty" yaml:"rename"` - SQLPackage string `json:"sql_package" yaml:"sql_package"` - SQLDriver string `json:"sql_driver" yaml:"sql_driver"` - OutputBatchFileName string `json:"output_batch_file_name,omitempty" yaml:"output_batch_file_name"` - OutputDBFileName string `json:"output_db_file_name,omitempty" yaml:"output_db_file_name"` - OutputModelsFileName string `json:"output_models_file_name,omitempty" yaml:"output_models_file_name"` - OutputQuerierFileName string `json:"output_querier_file_name,omitempty" yaml:"output_querier_file_name"` - OutputCopyFromFileName string `json:"output_copyfrom_file_name,omitempty" yaml:"output_copyfrom_file_name"` - OutputFilesSuffix string `json:"output_files_suffix,omitempty" yaml:"output_files_suffix"` - 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"` + Go *golang.Options `json:"go,omitempty" yaml:"go"` + JSON *SQLJSON `json:"json,omitempty" yaml:"json"` } type SQLJSON struct { @@ -175,13 +147,11 @@ type SQLJSON struct { var ErrMissingEngine = errors.New("unknown engine") var ErrMissingVersion = errors.New("no version number") var ErrNoOutPath = errors.New("no output path") -var ErrNoPackageName = errors.New("missing package name") var ErrNoPackagePath = errors.New("missing package path") var ErrNoPackages = errors.New("no packages") var ErrNoQuerierType = errors.New("no querier emit type enabled") var ErrUnknownEngine = errors.New("invalid engine") var ErrUnknownVersion = errors.New("invalid version number") -var ErrInvalidQueryParameterLimit = errors.New("invalid query parameter limit") var ErrPluginBuiltin = errors.New("a built-in plugin with that name already exists") var ErrPluginNoName = errors.New("missing plugin name") @@ -241,12 +211,10 @@ func ParseConfig(rd io.Reader) (Config, error) { } type CombinedSettings struct { - Global Config - Package SQL - Go SQLGo - JSON SQLJSON - Rename map[string]string - Overrides []Override + Global Config + Package SQL + Go golang.Options + JSON SQLJSON // TODO: Combine these into a more usable type Codegen Codegen @@ -256,20 +224,9 @@ func Combine(conf Config, pkg SQL) CombinedSettings { cs := CombinedSettings{ Global: conf, Package: pkg, - Rename: map[string]string{}, - } - if conf.Gen.Go != nil { - for k, v := range conf.Gen.Go.Rename { - cs.Rename[k] = v - } - cs.Overrides = append(cs.Overrides, conf.Gen.Go.Overrides...) } if pkg.Gen.Go != nil { cs.Go = *pkg.Gen.Go - for k, v := range pkg.Gen.Go.Rename { - cs.Rename[k] = v - } - cs.Overrides = append(cs.Overrides, pkg.Gen.Go.Overrides...) } if pkg.Gen.JSON != nil { cs.JSON = *pkg.Gen.JSON diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 240a4b4e1c..57211d674c 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -89,113 +89,3 @@ func TestInvalidConfig(t *testing.T) { t.Errorf("expected err; got nil") } } - -func TestTypeOverrides(t *testing.T) { - for _, test := range []struct { - override Override - pkg string - typeName string - basic bool - }{ - { - Override{ - DBType: "uuid", - GoType: GoType{Spec: "github.com/segmentio/ksuid.KSUID"}, - }, - "github.com/segmentio/ksuid", - "ksuid.KSUID", - false, - }, - // TODO: Add test for struct pointers - // - // { - // Override{ - // DBType: "uuid", - // GoType: "github.com/segmentio/*ksuid.KSUID", - // }, - // "github.com/segmentio/ksuid", - // "*ksuid.KSUID", - // false, - // }, - { - Override{ - DBType: "citext", - GoType: GoType{Spec: "string"}, - }, - "", - "string", - true, - }, - { - Override{ - DBType: "timestamp", - GoType: GoType{Spec: "time.Time"}, - }, - "time", - "time.Time", - false, - }, - } { - tt := test - t.Run(tt.override.GoType.Spec, func(t *testing.T) { - if err := tt.override.Parse(); err != nil { - t.Fatalf("override parsing failed; %s", err) - } - if diff := cmp.Diff(tt.pkg, tt.override.GoImportPath); diff != "" { - t.Errorf("package mismatch;\n%s", diff) - } - if diff := cmp.Diff(tt.typeName, tt.override.GoTypeName); diff != "" { - t.Errorf("type name mismatch;\n%s", diff) - } - if diff := cmp.Diff(tt.basic, tt.override.GoBasicType); diff != "" { - t.Errorf("basic mismatch;\n%s", diff) - } - }) - } - for _, test := range []struct { - override Override - err string - }{ - { - Override{ - DBType: "uuid", - GoType: GoType{Spec: "Pointer"}, - }, - "Package override `go_type` specifier \"Pointer\" is not a Go basic type e.g. 'string'", - }, - { - Override{ - DBType: "uuid", - GoType: GoType{Spec: "untyped rune"}, - }, - "Package override `go_type` specifier \"untyped rune\" is not a Go basic type e.g. 'string'", - }, - } { - tt := test - t.Run(tt.override.GoType.Spec, func(t *testing.T) { - err := tt.override.Parse() - if err == nil { - t.Fatalf("expected parse to fail; got nil") - } - if diff := cmp.Diff(tt.err, err.Error()); diff != "" { - t.Errorf("error mismatch;\n%s", diff) - } - }) - } -} - -func FuzzOverride(f *testing.F) { - for _, spec := range []string{ - "string", - "github.com/gofrs/uuid.UUID", - "github.com/segmentio/ksuid.KSUID", - } { - f.Add(spec) - } - f.Fuzz(func(t *testing.T, s string) { - o := Override{ - GoType: GoType{Spec: s}, - } - o.Parse() - }) -} diff --git a/internal/config/v_one.go b/internal/config/v_one.go index c6568ebb53..8efa9f42fc 100644 --- a/internal/config/v_one.go +++ b/internal/config/v_one.go @@ -6,55 +6,59 @@ import ( "path/filepath" yaml "gopkg.in/yaml.v3" + + golang "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" ) type V1GenerateSettings struct { Version string `json:"version" yaml:"version"` Cloud Cloud `json:"cloud" yaml:"cloud"` Packages []v1PackageSettings `json:"packages" yaml:"packages"` - Overrides []Override `json:"overrides,omitempty" yaml:"overrides,omitempty"` + Overrides []golang.Override `json:"overrides,omitempty" yaml:"overrides,omitempty"` Rename map[string]string `json:"rename,omitempty" yaml:"rename,omitempty"` Rules []Rule `json:"rules" yaml:"rules"` } 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"` - EmitInterface bool `json:"emit_interface" yaml:"emit_interface"` - EmitJSONTags bool `json:"emit_json_tags" yaml:"emit_json_tags"` - JsonTagsIDUppercase bool `json:"json_tags_id_uppercase" yaml:"json_tags_id_uppercase"` - EmitDBTags bool `json:"emit_db_tags" yaml:"emit_db_tags"` - EmitPreparedQueries bool `json:"emit_prepared_queries" yaml:"emit_prepared_queries"` - EmitExactTableNames bool `json:"emit_exact_table_names,omitempty" yaml:"emit_exact_table_names"` - EmitEmptySlices bool `json:"emit_empty_slices,omitempty" yaml:"emit_empty_slices"` - EmitExportedQueries bool `json:"emit_exported_queries,omitempty" yaml:"emit_exported_queries"` - EmitResultStructPointers bool `json:"emit_result_struct_pointers" yaml:"emit_result_struct_pointers"` - EmitParamsStructPointers bool `json:"emit_params_struct_pointers" yaml:"emit_params_struct_pointers"` - EmitMethodsWithDBArgument bool `json:"emit_methods_with_db_argument" yaml:"emit_methods_with_db_argument"` - EmitPointersForNullTypes bool `json:"emit_pointers_for_null_types" yaml:"emit_pointers_for_null_types"` - EmitEnumValidMethod bool `json:"emit_enum_valid_method,omitempty" yaml:"emit_enum_valid_method"` - EmitAllEnumValues bool `json:"emit_all_enum_values,omitempty" yaml:"emit_all_enum_values"` - JSONTagsCaseStyle string `json:"json_tags_case_style,omitempty" yaml:"json_tags_case_style"` - SQLPackage string `json:"sql_package" yaml:"sql_package"` - SQLDriver string `json:"sql_driver" yaml:"sql_driver"` - Overrides []Override `json:"overrides" yaml:"overrides"` - OutputBatchFileName string `json:"output_batch_file_name,omitempty" yaml:"output_batch_file_name"` - OutputDBFileName string `json:"output_db_file_name,omitempty" yaml:"output_db_file_name"` - OutputModelsFileName string `json:"output_models_file_name,omitempty" yaml:"output_models_file_name"` - OutputQuerierFileName string `json:"output_querier_file_name,omitempty" yaml:"output_querier_file_name"` - OutputCopyFromFileName string `json:"output_copyfrom_file_name,omitempty" yaml:"output_copyfrom_file_name"` - OutputFilesSuffix string `json:"output_files_suffix,omitempty" yaml:"output_files_suffix"` - StrictFunctionChecks bool `json:"strict_function_checks" yaml:"strict_function_checks"` - StrictOrderBy *bool `json:"strict_order_by" yaml:"strict_order_by"` - 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"` + 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"` + EmitInterface bool `json:"emit_interface" yaml:"emit_interface"` + EmitJSONTags bool `json:"emit_json_tags" yaml:"emit_json_tags"` + JsonTagsIDUppercase bool `json:"json_tags_id_uppercase" yaml:"json_tags_id_uppercase"` + EmitDBTags bool `json:"emit_db_tags" yaml:"emit_db_tags"` + EmitPreparedQueries bool `json:"emit_prepared_queries" yaml:"emit_prepared_queries"` + EmitExactTableNames bool `json:"emit_exact_table_names,omitempty" yaml:"emit_exact_table_names"` + EmitEmptySlices bool `json:"emit_empty_slices,omitempty" yaml:"emit_empty_slices"` + EmitExportedQueries bool `json:"emit_exported_queries,omitempty" yaml:"emit_exported_queries"` + EmitResultStructPointers bool `json:"emit_result_struct_pointers" yaml:"emit_result_struct_pointers"` + EmitParamsStructPointers bool `json:"emit_params_struct_pointers" yaml:"emit_params_struct_pointers"` + EmitMethodsWithDBArgument bool `json:"emit_methods_with_db_argument" yaml:"emit_methods_with_db_argument"` + EmitPointersForNullTypes bool `json:"emit_pointers_for_null_types" yaml:"emit_pointers_for_null_types"` + EmitEnumValidMethod bool `json:"emit_enum_valid_method,omitempty" yaml:"emit_enum_valid_method"` + EmitAllEnumValues bool `json:"emit_all_enum_values,omitempty" yaml:"emit_all_enum_values"` + EmitSqlAsComment bool `json:"emit_sql_as_comment,omitempty" yaml:"emit_sql_as_comment"` + JSONTagsCaseStyle string `json:"json_tags_case_style,omitempty" yaml:"json_tags_case_style"` + SQLPackage string `json:"sql_package" yaml:"sql_package"` + SQLDriver string `json:"sql_driver" yaml:"sql_driver"` + Overrides []golang.Override `json:"overrides" yaml:"overrides"` + OutputBatchFileName string `json:"output_batch_file_name,omitempty" yaml:"output_batch_file_name"` + OutputDBFileName string `json:"output_db_file_name,omitempty" yaml:"output_db_file_name"` + OutputModelsFileName string `json:"output_models_file_name,omitempty" yaml:"output_models_file_name"` + OutputQuerierFileName string `json:"output_querier_file_name,omitempty" yaml:"output_querier_file_name"` + OutputCopyFromFileName string `json:"output_copyfrom_file_name,omitempty" yaml:"output_copyfrom_file_name"` + OutputFilesSuffix string `json:"output_files_suffix,omitempty" yaml:"output_files_suffix"` + StrictFunctionChecks bool `json:"strict_function_checks" yaml:"strict_function_checks"` + StrictOrderBy *bool `json:"strict_order_by" yaml:"strict_order_by"` + QueryParameterLimit *int32 `json:"query_parameter_limit,omitempty" yaml:"query_parameter_limit"` + OmitSqlcVersion bool `json:"omit_sqlc_version,omitempty" yaml:"omit_sqlc_version"` + 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) { @@ -77,37 +81,18 @@ func v1ParseConfig(rd io.Reader) (Config, error) { if err := settings.ValidateGlobalOverrides(); err != nil { return config, err } - for i := range settings.Overrides { - if err := settings.Overrides[i].Parse(); err != nil { - return config, err - } - } for j := range settings.Packages { if settings.Packages[j].Path == "" { return config, ErrNoPackagePath } - if settings.Packages[j].QueryParameterLimit != nil && (*settings.Packages[j].QueryParameterLimit < 0) { - return config, ErrInvalidQueryParameterLimit - } - - if settings.Packages[j].QueryParameterLimit == nil { - settings.Packages[j].QueryParameterLimit = new(int32) - *settings.Packages[j].QueryParameterLimit = 1 - } - - for i := range settings.Packages[j].Overrides { - if err := settings.Packages[j].Overrides[i].Parse(); err != nil { - return config, err - } - } if settings.Packages[j].Name == "" { settings.Packages[j].Name = filepath.Base(settings.Packages[j].Path) } + if settings.Packages[j].Engine == "" { settings.Packages[j].Engine = EnginePostgreSQL } - } return settings.Translate(), nil @@ -151,34 +136,36 @@ func (c *V1GenerateSettings) Translate() Config { Rules: pkg.Rules, Analyzer: pkg.Analyzer, Gen: SQLGen{ - Go: &SQLGo{ + Go: &golang.Options{ EmitInterface: pkg.EmitInterface, - EmitJSONTags: pkg.EmitJSONTags, - JsonTagsIDUppercase: pkg.JsonTagsIDUppercase, - EmitDBTags: pkg.EmitDBTags, + EmitJsonTags: pkg.EmitJSONTags, + JsonTagsIdUppercase: pkg.JsonTagsIDUppercase, + EmitDbTags: pkg.EmitDBTags, EmitPreparedQueries: pkg.EmitPreparedQueries, EmitExactTableNames: pkg.EmitExactTableNames, EmitEmptySlices: pkg.EmitEmptySlices, EmitExportedQueries: pkg.EmitExportedQueries, EmitResultStructPointers: pkg.EmitResultStructPointers, EmitParamsStructPointers: pkg.EmitParamsStructPointers, - EmitMethodsWithDBArgument: pkg.EmitMethodsWithDBArgument, + EmitMethodsWithDbArgument: pkg.EmitMethodsWithDBArgument, EmitPointersForNullTypes: pkg.EmitPointersForNullTypes, EmitEnumValidMethod: pkg.EmitEnumValidMethod, EmitAllEnumValues: pkg.EmitAllEnumValues, + EmitSqlAsComment: pkg.EmitSqlAsComment, Package: pkg.Name, Out: pkg.Path, - SQLPackage: pkg.SQLPackage, - SQLDriver: pkg.SQLDriver, + SqlPackage: pkg.SQLPackage, + SqlDriver: pkg.SQLDriver, Overrides: pkg.Overrides, - JSONTagsCaseStyle: pkg.JSONTagsCaseStyle, + JsonTagsCaseStyle: pkg.JSONTagsCaseStyle, OutputBatchFileName: pkg.OutputBatchFileName, - OutputDBFileName: pkg.OutputDBFileName, + OutputDbFileName: pkg.OutputDBFileName, OutputModelsFileName: pkg.OutputModelsFileName, OutputQuerierFileName: pkg.OutputQuerierFileName, - OutputCopyFromFileName: pkg.OutputCopyFromFileName, + OutputCopyfromFileName: pkg.OutputCopyFromFileName, OutputFilesSuffix: pkg.OutputFilesSuffix, QueryParameterLimit: pkg.QueryParameterLimit, + OmitSqlcVersion: pkg.OmitSqlcVersion, OmitUnusedStructs: pkg.OmitUnusedStructs, BuildTags: pkg.BuildTags, }, @@ -189,7 +176,7 @@ func (c *V1GenerateSettings) Translate() Config { } if len(c.Overrides) > 0 || len(c.Rename) > 0 { - conf.Gen.Go = &GenGo{ + conf.Overrides.Go = &golang.GlobalOptions{ Overrides: c.Overrides, Rename: c.Rename, } diff --git a/internal/config/v_one.json b/internal/config/v_one.json index 166888ab93..a0667a7c9c 100644 --- a/internal/config/v_one.json +++ b/internal/config/v_one.json @@ -131,6 +131,9 @@ "emit_all_enum_values": { "type": "boolean" }, + "emit_sql_as_comment": { + "type": "boolean" + }, "build_tags": { "type": "string" }, @@ -340,4 +343,4 @@ } } } -} \ No newline at end of file +} diff --git a/internal/config/v_two.go b/internal/config/v_two.go index e2c97a2749..0fe22ffa2c 100644 --- a/internal/config/v_two.go +++ b/internal/config/v_two.go @@ -3,7 +3,6 @@ package config import ( "fmt" "io" - "path/filepath" yaml "gopkg.in/yaml.v3" ) @@ -27,13 +26,6 @@ func v2ParseConfig(rd io.Reader) (Config, error) { if err := conf.validateGlobalOverrides(); err != nil { return conf, err } - if conf.Gen.Go != nil { - for i := range conf.Gen.Go.Overrides { - if err := conf.Gen.Go.Overrides[i].Parse(); err != nil { - return conf, err - } - } - } // TODO: Store built-in plugins somewhere else builtins := map[string]struct{}{ "go": {}, @@ -71,27 +63,6 @@ func v2ParseConfig(rd io.Reader) (Config, error) { if conf.SQL[j].Gen.Go.Out == "" { return conf, ErrNoPackagePath } - if conf.SQL[j].Gen.Go.Package == "" { - conf.SQL[j].Gen.Go.Package = filepath.Base(conf.SQL[j].Gen.Go.Out) - } - - if conf.SQL[j].Gen.Go.QueryParameterLimit != nil && (*conf.SQL[j].Gen.Go.QueryParameterLimit < 0) { - return conf, ErrInvalidQueryParameterLimit - } - - if conf.SQL[j].Gen.Go.QueryParameterLimit == nil { - conf.SQL[j].Gen.Go.QueryParameterLimit = new(int32) - *conf.SQL[j].Gen.Go.QueryParameterLimit = 1 - } - - for i := range conf.SQL[j].Gen.Go.Overrides { - if err := conf.SQL[j].Gen.Go.Overrides[i].Parse(); err != nil { - return conf, err - } - } - for k, v := range conf.SQL[j].Gen.Go.Rename { - conf.SQL[j].Gen.Go.Rename[k] = v - } } if conf.SQL[j].Gen.JSON != nil { if conf.SQL[j].Gen.JSON.Out == "" { @@ -105,7 +76,7 @@ func v2ParseConfig(rd io.Reader) (Config, error) { if cg.Out == "" { return conf, ErrNoOutPath } - // TOOD: Allow the use of built-in codegen from here + // TODO: Allow the use of built-in codegen from here if _, ok := plugins[cg.Plugin]; !ok { return conf, ErrPluginNotFound } @@ -125,11 +96,11 @@ func (c *Config) validateGlobalOverrides() error { engines[pkg.Engine] = struct{}{} } } - if c.Gen.Go == nil { + if c.Overrides.Go == nil { return nil } usesMultipleEngines := len(engines) > 1 - for _, oride := range c.Gen.Go.Overrides { + for _, oride := range c.Overrides.Go.Overrides { if usesMultipleEngines && oride.Engine == "" { return fmt.Errorf(`the "engine" field is required for global type overrides because your configuration uses multiple database engines`) } diff --git a/internal/config/v_two.json b/internal/config/v_two.json index dd39fddc10..acf914997d 100644 --- a/internal/config/v_two.json +++ b/internal/config/v_two.json @@ -140,6 +140,9 @@ "emit_all_enum_values": { "type": "boolean" }, + "emit_sql_as_comment": { + "type": "boolean" + }, "build_tags": { "type": "string" }, diff --git a/internal/constants/query.go b/internal/constants/query.go new file mode 100644 index 0000000000..a572c56c6f --- /dev/null +++ b/internal/constants/query.go @@ -0,0 +1,12 @@ +package constants + +// Flags +const ( + QueryFlagParam = "@param" + QueryFlagSqlcVetDisable = "@sqlc-vet-disable" +) + +// Rules +const ( + QueryRuleDbPrepare = "sqlc/db-prepare" +) diff --git a/internal/dbmanager/client.go b/internal/dbmanager/client.go new file mode 100644 index 0000000000..18aec947cb --- /dev/null +++ b/internal/dbmanager/client.go @@ -0,0 +1,150 @@ +package dbmanager + +import ( + "context" + "fmt" + "hash/fnv" + "io" + "net/url" + "strings" + + "github.com/jackc/pgx/v5" + "golang.org/x/sync/singleflight" + + "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/pgx/poolcache" + "github.com/sqlc-dev/sqlc/internal/shfmt" +) + +type CreateDatabaseRequest struct { + Engine string + Migrations []string + Prefix string +} + +type CreateDatabaseResponse struct { + Uri string +} + +type Client interface { + CreateDatabase(context.Context, *CreateDatabaseRequest) (*CreateDatabaseResponse, error) + Close(context.Context) +} + +var flight singleflight.Group + +type ManagedClient struct { + cache *poolcache.Cache + replacer *shfmt.Replacer + servers []config.Server +} + +func dbid(migrations []string) string { + h := fnv.New64() + for _, query := range migrations { + io.WriteString(h, query) + } + return fmt.Sprintf("%x", h.Sum(nil)) +} + +func (m *ManagedClient) CreateDatabase(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + hash := dbid(req.Migrations) + prefix := req.Prefix + if prefix == "" { + prefix = "sqlc_managed" + } + name := fmt.Sprintf("%s_%s", prefix, hash) + + engine := config.Engine(req.Engine) + switch engine { + case config.EngineMySQL: + // pass + case config.EnginePostgreSQL: + // pass + default: + return nil, fmt.Errorf("unsupported engine: %s", engine) + } + + var base string + for _, server := range m.servers { + if server.Engine == engine { + base = server.URI + break + } + } + + if strings.TrimSpace(base) == "" { + return nil, fmt.Errorf("no PostgreSQL database server found") + } + + serverUri := m.replacer.Replace(base) + pool, err := m.cache.Open(ctx, serverUri) + if err != nil { + return nil, err + } + + uri, err := url.Parse(serverUri) + if err != nil { + return nil, err + } + uri.Path = "/" + name + + key := uri.String() + _, err, _ = flight.Do(key, func() (interface{}, error) { + // TODO: Use a parameterized query + row := pool.QueryRow(ctx, + fmt.Sprintf(`SELECT datname FROM pg_database WHERE datname = '%s'`, name)) + + var datname string + if err := row.Scan(&datname); err == nil { + return nil, nil + } + + if _, err := pool.Exec(ctx, fmt.Sprintf(`CREATE DATABASE "%s"`, name)); err != nil { + return nil, err + } + + conn, err := pgx.Connect(ctx, uri.String()) + if err != nil { + pool.Exec(ctx, fmt.Sprintf(`DROP DATABASE IF EXISTS "%s" WITH (FORCE)`, name)) + return nil, fmt.Errorf("connect %s: %s", name, err) + } + defer conn.Close(ctx) + + var migrationErr error + for _, q := range req.Migrations { + if len(strings.TrimSpace(q)) == 0 { + continue + } + if _, err := conn.Exec(ctx, q); err != nil { + migrationErr = fmt.Errorf("%s: %s", q, err) + break + } + } + + if migrationErr != nil { + pool.Exec(ctx, fmt.Sprintf(`DROP DATABASE IF EXISTS "%s" WITH (FORCE)`, name)) + return nil, migrationErr + } + + return nil, nil + }) + + if err != nil { + return nil, err + } + + return &CreateDatabaseResponse{Uri: key}, err +} + +func (m *ManagedClient) Close(ctx context.Context) { + m.cache.Close() +} + +func NewClient(servers []config.Server) *ManagedClient { + return &ManagedClient{ + cache: poolcache.New(), + servers: servers, + replacer: shfmt.NewReplacer(nil), + } +} diff --git a/internal/endtoend/case_test.go b/internal/endtoend/case_test.go index 367b9dd158..4389a4da28 100644 --- a/internal/endtoend/case_test.go +++ b/internal/endtoend/case_test.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "runtime" "strings" "testing" ) @@ -17,17 +18,24 @@ type Testcase struct { Exec *Exec } +type ExecMeta struct { + InvalidSchema bool `json:"invalid_schema"` +} + type Exec struct { Command string `json:"command"` Contexts []string `json:"contexts"` Process string `json:"process"` + OS []string `json:"os"` Env map[string]string `json:"env"` + Meta ExecMeta `json:"meta"` } 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, fmt.Sprintf("stderr_%s.txt", runtime.GOOS)), filepath.Join(dir, "stderr.txt"), } for _, path := range paths { @@ -51,10 +59,10 @@ func parseExec(t *testing.T, dir string) *Exec { var e Exec blob, err := os.ReadFile(path) if err != nil { - t.Fatal(err) + t.Fatalf("%s: %s", path, err) } if err := json.Unmarshal(blob, &e); err != nil { - t.Fatal(err) + t.Fatalf("%s: %s", path, err) } if e.Command == "" { e.Command = "generate" diff --git a/internal/endtoend/ddl_test.go b/internal/endtoend/ddl_test.go index c77389207d..bed9333743 100644 --- a/internal/endtoend/ddl_test.go +++ b/internal/endtoend/ddl_test.go @@ -1,46 +1,21 @@ package main import ( - "context" "fmt" "os" "path/filepath" - "slices" - "strings" "testing" - "github.com/jackc/pgx/v5" - "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" + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestValidSchema(t *testing.T) { - ctx := context.Background() - - projectID := os.Getenv("CI_SQLC_PROJECT_ID") - authToken := os.Getenv("CI_SQLC_AUTH_TOKEN") - if projectID == "" || authToken == "" { - t.Skip("missing project id or auth token") - } - - client, err := quickdb.NewClient(projectID, authToken) - if err != nil { - t.Fatal(err) - } - - for _, replay := range FindTests(t, "testdata", "managed-db") { + for _, replay := range FindTests(t, "testdata", "base") { replay := replay // https://golang.org/doc/faq#closures_and_goroutines - if len(replay.Stderr) > 0 { - continue - } - if replay.Exec != nil { - if !slices.Contains(replay.Exec.Contexts, "managed-db") { + if replay.Exec.Meta.InvalidSchema { continue } } @@ -58,60 +33,28 @@ func TestValidSchema(t *testing.T) { for j, pkg := range conf.SQL { j, pkg := j, pkg - if pkg.Engine != config.EnginePostgreSQL { + switch pkg.Engine { + case config.EnginePostgreSQL: + // pass + case config.EngineMySQL: + // pass + default: continue } t.Run(fmt.Sprintf("endtoend-%s-%d", file, j), func(t *testing.T) { t.Parallel() - if strings.Contains(file, "pg_dump") { - t.Skip("loading pg_dump not supported") - } - var schema []string for _, path := range pkg.Schema { schema = append(schema, filepath.Join(filepath.Dir(file), path)) } - files, err := sqlpath.Glob(schema) - if err != nil { - t.Fatal(err) - } - - var sqls []string - for _, f := range files { - contents, err := os.ReadFile(f) - if err != nil { - t.Fatalf("%s: %s", f, err) - } - // Support loading pg_dump SQL files - before := strings.ReplaceAll(string(contents), "CREATE SCHEMA public;", "CREATE SCHEMA IF NOT EXISTS public;") - sqls = append(sqls, migrations.RemoveRollbackStatements(before)) - } - - resp, err := client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ - Engine: "postgresql", - Region: quickdb.GetClosestRegion(), - Migrations: sqls, - }) - if err != nil { - t.Fatalf("region %s: %s", quickdb.GetClosestRegion(), err) - } - - t.Cleanup(func() { - _, err = client.DropEphemeralDatabase(ctx, &pb.DropEphemeralDatabaseRequest{ - DatabaseId: resp.DatabaseId, - }) - if err != nil { - t.Fatal(err) - } - }) - - conn, err := pgx.Connect(ctx, resp.Uri) - if err != nil { - t.Fatalf("connect %s: %s", resp.Uri, err) + switch pkg.Engine { + case config.EnginePostgreSQL: + local.PostgreSQL(t, schema) + case config.EngineMySQL: + local.MySQL(t, schema) } - defer conn.Close(ctx) }) } } diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index aea72c5dbf..311eba9825 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -6,6 +6,7 @@ import ( "os" osexec "os/exec" "path/filepath" + "runtime" "slices" "strings" "testing" @@ -16,8 +17,23 @@ import ( "github.com/sqlc-dev/sqlc/internal/cmd" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/opts" + "github.com/sqlc-dev/sqlc/internal/sqltest/docker" ) +func lineEndings() cmp.Option { + return cmp.Transformer("LineEndings", func(in string) string { + // Replace Windows new lines with Unix newlines + return strings.Replace(in, "\r\n", "\n", -1) + }) +} + +func stderrTransformer() cmp.Option { + return cmp.Transformer("Stderr", func(in string) string { + s := strings.Replace(in, "\r", "", -1) + return strings.Replace(s, "\\", "/", -1) + }) +} + func TestExamples(t *testing.T) { t.Parallel() ctx := context.Background() @@ -84,7 +100,7 @@ func BenchmarkExamples(b *testing.B) { } type textContext struct { - Mutate func(*config.Config) + Mutate func(*testing.T, string) func(*config.Config) Enabled func() bool } @@ -96,22 +112,64 @@ func TestReplay(t *testing.T) { // t.Parallel() ctx := context.Background() + var mysqlURI, postgresURI string + if err := docker.Installed(); err == nil { + { + host, err := docker.StartPostgreSQLServer(ctx) + if err != nil { + t.Fatalf("starting postgresql failed: %s", err) + } + postgresURI = host + } + { + host, err := docker.StartMySQLServer(ctx) + if err != nil { + t.Fatalf("starting mysql failed: %s", err) + } + mysqlURI = host + } + } + contexts := map[string]textContext{ "base": { - Mutate: func(c *config.Config) {}, + Mutate: func(t *testing.T, path string) func(*config.Config) { return 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, + Mutate: func(t *testing.T, path string) func(*config.Config) { + return func(c *config.Config) { + c.Servers = []config.Server{ + { + Name: "postgres", + Engine: config.EnginePostgreSQL, + URI: postgresURI, + }, + + { + Name: "mysql", + Engine: config.EngineMySQL, + URI: mysqlURI, + }, + } + for i := range c.SQL { + switch c.SQL[i].Engine { + case config.EnginePostgreSQL: + c.SQL[i].Database = &config.Database{ + Managed: true, + } + case config.EngineMySQL: + c.SQL[i].Database = &config.Database{ + Managed: true, + } + default: + // pass + } } } }, Enabled: func() bool { - return len(os.Getenv("SQLC_AUTH_TOKEN")) > 0 + err := docker.Installed() + return err == nil }, }, } @@ -127,8 +185,6 @@ func TestReplay(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 @@ -153,13 +209,19 @@ func TestReplay(t *testing.T) { } } + if len(args.OS) > 0 { + if !slices.Contains(args.OS, runtime.GOOS) { + t.Skipf("unsupported os: %s", runtime.GOOS) + } + } + opts := cmd.Options{ Env: cmd.Env{ Debug: opts.DebugFromString(args.Env["SQLCDEBUG"]), NoRemote: true, }, Stderr: &stderr, - MutateConfig: testctx.Mutate, + MutateConfig: testctx.Mutate(t, path), } switch args.Command { @@ -180,7 +242,11 @@ func TestReplay(t *testing.T) { t.Fatalf("sqlc %s failed: %s", args.Command, stderr.String()) } - diff := cmp.Diff(strings.TrimSpace(expected), strings.TrimSpace(stderr.String())) + diff := cmp.Diff( + strings.TrimSpace(expected), + strings.TrimSpace(stderr.String()), + stderrTransformer(), + ) if diff != "" { t.Fatalf("stderr differed (-want +got):\n%s", diff) } @@ -233,7 +299,12 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) { t.Fatal(err) } - if !cmp.Equal(expected, actual, cmpopts.EquateEmpty()) { + opts := []cmp.Option{ + cmpopts.EquateEmpty(), + lineEndings(), + } + + if !cmp.Equal(expected, actual, opts...) { t.Errorf("%s contents differ", dir) for name, contents := range expected { name := name @@ -241,7 +312,7 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) { t.Errorf("%s is empty", name) return } - if diff := cmp.Diff(contents, actual[name]); diff != "" { + if diff := cmp.Diff(contents, actual[name], opts...); diff != "" { t.Errorf("%s differed (-want +got):\n%s", name, diff) } } diff --git a/internal/endtoend/fmt_test.go b/internal/endtoend/fmt_test.go index 22b5f1392d..04e753e5b7 100644 --- a/internal/endtoend/fmt_test.go +++ b/internal/endtoend/fmt_test.go @@ -8,7 +8,6 @@ import ( "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" @@ -40,7 +39,7 @@ func TestFormat(t *testing.T) { } query := query t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { - expected, err := pg_query.Fingerprint(string(query)) + expected, err := postgresql.Fingerprint(string(query)) if err != nil { t.Fatal(err) } @@ -52,12 +51,12 @@ func TestFormat(t *testing.T) { t.Fatal("expected one statement") } if false { - r, err := pg_query.Parse(string(query)) + r, err := postgresql.Parse(string(query)) debug.Dump(r, err) } out := ast.Format(stmts[0].Raw) - actual, err := pg_query.Fingerprint(out) + actual, err := postgresql.Fingerprint(out) if err != nil { t.Error(err) } diff --git a/internal/endtoend/testdata/alias/mysql/go/db.go b/internal/endtoend/testdata/alias/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/alias/mysql/go/models.go b/internal/endtoend/testdata/alias/mysql/go/models.go index da0f666392..65820844a6 100644 --- a/internal/endtoend/testdata/alias/mysql/go/models.go +++ b/internal/endtoend/testdata/alias/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 } diff --git a/internal/endtoend/testdata/alias/mysql/go/query.sql.go b/internal/endtoend/testdata/alias/mysql/go/query.sql.go index 3369c21e4f..65c9e9044e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 0fbe614f61..91a4336a66 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 0fbe614f61..91a4336a66 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 7fcaa8ad4d..d082362095 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/alias/sqlite/go/models.go b/internal/endtoend/testdata/alias/sqlite/go/models.go index 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/alias/sqlite/go/models.go +++ b/internal/endtoend/testdata/alias/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } diff --git a/internal/endtoend/testdata/alias/sqlite/go/query.sql.go b/internal/endtoend/testdata/alias/sqlite/go/query.sql.go index 72158d29e8..66c338beb1 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/any/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/any/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 ba1ea42f26..d191817769 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/any/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/any/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 ba1ea42f26..d191817769 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/any/stdlib/go/models.go b/internal/endtoend/testdata/any/stdlib/go/models.go index 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/any/stdlib/go/models.go +++ b/internal/endtoend/testdata/any/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } diff --git a/internal/endtoend/testdata/any/stdlib/go/query.sql.go b/internal/endtoend/testdata/any/stdlib/go/query.sql.go index e732fa5f9a..7adc371a65 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/array_in/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/array_in/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 72a442649c..6f95dad606 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/array_in/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/array_in/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 72a442649c..6f95dad606 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/array_in/stdlib/go/models.go +++ b/internal/endtoend/testdata/array_in/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 83791bdb5e..e63538bd0e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 999832118d..84b877e966 100644 --- a/internal/endtoend/testdata/array_text/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/array_text/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Tags []string } 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 cdfa9cab1c..1c1dec9c23 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 999832118d..84b877e966 100644 --- a/internal/endtoend/testdata/array_text/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/array_text/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Tags []string } 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 cdfa9cab1c..1c1dec9c23 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 999832118d..84b877e966 100644 --- a/internal/endtoend/testdata/array_text/stdlib/go/models.go +++ b/internal/endtoend/testdata/array_text/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Tags []string } 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 bf4b693ff7..20946c6015 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 19dcf46f62..90d0021ea1 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string Info []string 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 393c0d45ea..f4eab73a31 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 19dcf46f62..90d0021ea1 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string Info []string 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 393c0d45ea..f4eab73a31 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 19dcf46f62..90d0021ea1 100644 --- a/internal/endtoend/testdata/array_text_join/stdlib/go/models.go +++ b/internal/endtoend/testdata/array_text_join/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string Info []string 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 2c3e0890bf..5ffc67158e 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/bad_config/engine/query.sql b/internal/endtoend/testdata/bad_config/engine/query.sql new file mode 100644 index 0000000000..18b0c0d03c --- /dev/null +++ b/internal/endtoend/testdata/bad_config/engine/query.sql @@ -0,0 +1,2 @@ +-- name: Test :exec +SELECT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/bad_config/engine/sqlc.yaml b/internal/endtoend/testdata/bad_config/engine/sqlc.yaml new file mode 100644 index 0000000000..8f20b4eaa5 --- /dev/null +++ b/internal/endtoend/testdata/bad_config/engine/sqlc.yaml @@ -0,0 +1,8 @@ +version: 2 +sql: +- queries: query.sql + schema: query.sql + engine: "bad_engine" + gen: + go: + out: "db" \ No newline at end of file diff --git a/internal/endtoend/testdata/bad_config/engine/stderr.txt b/internal/endtoend/testdata/bad_config/engine/stderr.txt new file mode 100644 index 0000000000..9797244924 --- /dev/null +++ b/internal/endtoend/testdata/bad_config/engine/stderr.txt @@ -0,0 +1 @@ +error creating compiler: unknown engine: bad_engine \ No newline at end of file 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 0807fba81d..adaedfa3c0 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.23.0 +// sqlc v1.30.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 e9e8215a7f..fa88475d3d 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.23.0 +// sqlc v1.30.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 4085d1869c..f0e5a24373 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.23.0 +// sqlc v1.30.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 a6a0b2f99e..a80cdbd2f0 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,8 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest - -import () 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 93a64195f2..b61a4ca6c8 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.23.0 +// sqlc v1.30.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 111654b366..9a44027379 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.23.0 +// sqlc v1.30.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 4d60a0605d..7226216da5 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.23.0 +// sqlc v1.30.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 a6a0b2f99e..a80cdbd2f0 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,8 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest - -import () 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 035171b303..adefff482a 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.23.0 +// sqlc v1.30.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 e9e8215a7f..fa88475d3d 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.23.0 +// sqlc v1.30.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 4085d1869c..f0e5a24373 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.23.0 +// sqlc v1.30.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 7b7670a92c..e5b3f3a089 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.23.0 +// sqlc v1.30.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 3fec6b6503..e9ed1d9634 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.23.0 +// sqlc v1.30.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 111654b366..9a44027379 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.23.0 +// sqlc v1.30.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 4d60a0605d..7226216da5 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.23.0 +// sqlc v1.30.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 d02bfdcca2..c3bd3f6e65 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/batch_parameter_limit/issue.md b/internal/endtoend/testdata/batch_parameter_limit/issue.md new file mode 100644 index 0000000000..e0d6146269 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/3185 diff --git a/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/batch.go b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/batch.go new file mode 100644 index 0000000000..9e0fc66652 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/batch.go @@ -0,0 +1,71 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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 createAuthors = `-- name: CreateAuthors :batchexec +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +` + +type CreateAuthorsBatchResults struct { + br pgx.BatchResults + tot int + closed bool +} + +type CreateAuthorsParams struct { + Name string + Bio pgtype.Text +} + +func (q *Queries) CreateAuthors(ctx context.Context, arg []CreateAuthorsParams) *CreateAuthorsBatchResults { + batch := &pgx.Batch{} + for _, a := range arg { + vals := []interface{}{ + a.Name, + a.Bio, + } + batch.Queue(createAuthors, vals...) + } + br := q.db.SendBatch(ctx, batch) + return &CreateAuthorsBatchResults{br, len(arg), false} +} + +func (b *CreateAuthorsBatchResults) 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 *CreateAuthorsBatchResults) Close() error { + b.closed = true + return b.br.Close() +} diff --git a/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/db.go b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..9a44027379 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/db.go @@ -0,0 +1,33 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_limit/postgresql/pgx/go/models.go b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..e4cf9d17ae --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/batch_parameter_limit/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..a80cdbd2f0 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/query.sql.go @@ -0,0 +1,6 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest diff --git a/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/query.sql b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/query.sql new file mode 100644 index 0000000000..3c25c9349e --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/query.sql @@ -0,0 +1,6 @@ +-- name: CreateAuthors :batchexec +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +); diff --git a/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/schema.sql b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..69b607d902 --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/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/batch_parameter_limit/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..e5eb77fa4e --- /dev/null +++ b/internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/sqlc.yaml @@ -0,0 +1,11 @@ +version: "2" +sql: + - engine: "postgresql" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "pgx/v5" + query_parameter_limit: 2 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 056374dfc6..bf8da49f59 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.23.0 +// sqlc v1.30.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 111654b366..9a44027379 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.23.0 +// sqlc v1.30.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 d3f0d8a013..c75fd00ac3 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.23.0 +// sqlc v1.30.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 a6a0b2f99e..a80cdbd2f0 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,8 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest - -import () diff --git a/internal/endtoend/testdata/between_args/mysql/go/db.go b/internal/endtoend/testdata/between_args/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 86e4ff4658..5d811ab385 100644 --- a/internal/endtoend/testdata/between_args/mysql/go/models.go +++ b/internal/endtoend/testdata/between_args/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Product struct { ID int64 Name string 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 6d8102aae4..6270cb28c0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e320489a62..d03b9b329b 100644 --- a/internal/endtoend/testdata/between_args/sqlite/go/models.go +++ b/internal/endtoend/testdata/between_args/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Product struct { Name string Price int64 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 2693e5ae9d..4265ed944d 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 dc8534feaa..0c086e39e1 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.23.0 +// sqlc v1.30.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 b5e2bff104..c69ebfb265 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 1c46544c1b..0b1dad3b41 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.23.0 +// sqlc v1.30.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 b5e2bff104..c69ebfb265 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.23.0 +// sqlc v1.30.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 b3b8689e1f..60956b99c4 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.23.0 +// sqlc v1.30.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 bc06b16c28..4365cb07ec 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.23.0 +// sqlc v1.30.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 f9f4aa355a..0fe1b09fe9 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.23.0 +// sqlc v1.30.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 cb52d02a91..9dc153a3aa 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.23.0 +// sqlc v1.30.0 // source: query.sql package authors diff --git a/internal/endtoend/testdata/builtins/postgresql/exec.json b/internal/endtoend/testdata/builtins/postgresql/exec.json new file mode 100644 index 0000000000..97f81fbc66 --- /dev/null +++ b/internal/endtoend/testdata/builtins/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["base"] +} diff --git a/internal/endtoend/testdata/builtins/postgresql/go/db.go b/internal/endtoend/testdata/builtins/postgresql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/builtins/postgresql/go/models.go b/internal/endtoend/testdata/builtins/postgresql/go/models.go index eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/builtins/postgresql/go/models.go +++ b/internal/endtoend/testdata/builtins/postgresql/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () diff --git a/internal/endtoend/testdata/builtins/postgresql/go/query.sql.go b/internal/endtoend/testdata/builtins/postgresql/go/query.sql.go new file mode 100644 index 0000000000..1c72cea1c8 --- /dev/null +++ b/internal/endtoend/testdata/builtins/postgresql/go/query.sql.go @@ -0,0 +1,274 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const abs = `-- name: Abs :one +SELECT abs(-17.4) +` + +func (q *Queries) Abs(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, abs) + var abs int64 + err := row.Scan(&abs) + return abs, err +} + +const cbrt = `-- name: Cbrt :one +SELECT cbrt(27.0) +` + +func (q *Queries) Cbrt(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, cbrt) + var cbrt float64 + err := row.Scan(&cbrt) + return cbrt, err +} + +const ceil = `-- name: Ceil :one +SELECT ceil(-42.8) +` + +func (q *Queries) Ceil(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, ceil) + var ceil float64 + err := row.Scan(&ceil) + return ceil, err +} + +const ceiling = `-- name: Ceiling :one +SELECT ceiling(-95.3) +` + +func (q *Queries) Ceiling(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, ceiling) + var ceiling float64 + err := row.Scan(&ceiling) + return ceiling, err +} + +const degrees = `-- name: Degrees :one +SELECT degrees(0.5) +` + +func (q *Queries) Degrees(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, degrees) + var degrees float64 + err := row.Scan(°rees) + return degrees, err +} + +const div = `-- name: Div :one +SELECT div(9,4) +` + +func (q *Queries) Div(ctx context.Context) (string, error) { + row := q.db.QueryRowContext(ctx, div) + var div string + err := row.Scan(&div) + return div, err +} + +const exp = `-- name: Exp :one +SELECT exp(1.0) +` + +func (q *Queries) Exp(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, exp) + var exp float64 + err := row.Scan(&exp) + return exp, err +} + +const floor = `-- name: Floor :one +SELECT floor(-42.8) +` + +func (q *Queries) Floor(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, floor) + var floor float64 + err := row.Scan(&floor) + return floor, err +} + +const ln = `-- name: Ln :one +SELECT ln(2.0) +` + +func (q *Queries) Ln(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, ln) + var ln float64 + err := row.Scan(&ln) + return ln, err +} + +const log = `-- name: Log :one +SELECT log(100.0) +` + +func (q *Queries) Log(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, log) + var log float64 + err := row.Scan(&log) + return log, err +} + +const logs = `-- name: Logs :one +SELECT log(2.0, 64.0) +` + +func (q *Queries) Logs(ctx context.Context) (string, error) { + row := q.db.QueryRowContext(ctx, logs) + var log string + err := row.Scan(&log) + return log, err +} + +const mod = `-- name: Mod :one +SELECT mod(9,4) +` + +func (q *Queries) Mod(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, mod) + var mod int64 + err := row.Scan(&mod) + return mod, err +} + +const pi = `-- name: Pi :one +SELECT pi() +` + +func (q *Queries) Pi(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, pi) + var pi float64 + err := row.Scan(&pi) + return pi, err +} + +const power = `-- name: Power :one +SELECT power(9.0, 3.0) +` + +func (q *Queries) Power(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, power) + var power float64 + err := row.Scan(&power) + return power, err +} + +const radians = `-- name: Radians :one +SELECT radians(45.0) +` + +func (q *Queries) Radians(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, radians) + var radians float64 + err := row.Scan(&radians) + return radians, err +} + +const round = `-- name: Round :one +SELECT round(42.4) +` + +func (q *Queries) Round(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, round) + var round float64 + err := row.Scan(&round) + return round, err +} + +const rounds = `-- name: Rounds :one +SELECT round(42.4382, 2) +` + +func (q *Queries) Rounds(ctx context.Context) (string, error) { + row := q.db.QueryRowContext(ctx, rounds) + var round string + err := row.Scan(&round) + return round, err +} + +const scale = `-- name: Scale :one +SELECT scale(8.41) +` + +func (q *Queries) Scale(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, scale) + var scale int32 + err := row.Scan(&scale) + return scale, err +} + +const sign = `-- name: Sign :one +SELECT sign(-8.4) +` + +func (q *Queries) Sign(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, sign) + var sign float64 + err := row.Scan(&sign) + return sign, err +} + +const sqrt = `-- name: Sqrt :one +SELECT sqrt(2.0) +` + +func (q *Queries) Sqrt(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, sqrt) + var sqrt float64 + err := row.Scan(&sqrt) + return sqrt, err +} + +const trunc = `-- name: Trunc :one +SELECT trunc(42.8) +` + +func (q *Queries) Trunc(ctx context.Context) (float64, error) { + row := q.db.QueryRowContext(ctx, trunc) + var trunc float64 + err := row.Scan(&trunc) + return trunc, err +} + +const truncs = `-- name: Truncs :one +SELECT trunc(42.4382, 2) +` + +func (q *Queries) Truncs(ctx context.Context) (string, error) { + row := q.db.QueryRowContext(ctx, truncs) + var trunc string + err := row.Scan(&trunc) + return trunc, err +} + +const widthBucketNumerics = `-- name: WidthBucketNumerics :one +SELECT width_bucket(5.35, 0.024, 10.06, 5) +` + +func (q *Queries) WidthBucketNumerics(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, widthBucketNumerics) + var width_bucket int32 + err := row.Scan(&width_bucket) + return width_bucket, err +} + +const widthBucketTimestamps = `-- name: WidthBucketTimestamps :one +SELECT width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[]) +` + +func (q *Queries) WidthBucketTimestamps(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, widthBucketTimestamps) + var width_bucket int32 + err := row.Scan(&width_bucket) + return width_bucket, err +} diff --git a/internal/endtoend/testdata/builtins/postgresql/query.sql b/internal/endtoend/testdata/builtins/postgresql/query.sql index ee4723f8ed..2c62e5f772 100644 --- a/internal/endtoend/testdata/builtins/postgresql/query.sql +++ b/internal/endtoend/testdata/builtins/postgresql/query.sql @@ -1,25 +1,48 @@ +-- name: Abs :one SELECT abs(-17.4); +-- name: Cbrt :one SELECT cbrt(27.0); +-- name: Ceil :one SELECT ceil(-42.8); +-- name: Ceiling :one SELECT ceiling(-95.3); +-- name: Degrees :one SELECT degrees(0.5); +-- name: Div :one SELECT div(9,4); +-- name: Exp :one SELECT exp(1.0); +-- name: Floor :one SELECT floor(-42.8); +-- name: Ln :one SELECT ln(2.0); +-- name: Log :one SELECT log(100.0); +-- name: Logs :one SELECT log(2.0, 64.0); +-- name: Mod :one SELECT mod(9,4); +-- name: Pi :one SELECT pi(); +-- name: Power :one SELECT power(9.0, 3.0); +-- name: Radians :one SELECT radians(45.0); +-- name: Round :one SELECT round(42.4); +-- name: Rounds :one SELECT round(42.4382, 2); +-- name: Scale :one SELECT scale(8.41); +-- name: Sign :one SELECT sign(-8.4); +-- name: Sqrt :one SELECT sqrt(2.0); +-- name: Trunc :one SELECT trunc(42.8); +-- name: Truncs :one SELECT trunc(42.4382, 2); +-- name: WidthBucketNumerics :one SELECT width_bucket(5.35, 0.024, 10.06, 5); +-- name: WidthBucketTimestamps :one SELECT width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[]); -create schema if not exists sqlc; diff --git a/internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go b/internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go index d36dce92db..370401e4d7 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 732a8edabc..bc1532576b 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.23.0 +// sqlc v1.30.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 485e4ead51..ba96e73b83 100644 --- a/internal/endtoend/testdata/builtins/sqlite/go/models.go +++ b/internal/endtoend/testdata/builtins/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Test struct { ID int64 IntVal int64 diff --git a/internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go b/internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go index 56ded1576d..a54cb8134c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c760534701..34088348d6 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.23.0 +// sqlc v1.30.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 048c2ecaf4..54d0542f78 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_named_params/mysql/schema.sql b/internal/endtoend/testdata/case_named_params/mysql/schema.sql index 3053802224..5e2bcfacf0 100644 --- a/internal/endtoend/testdata/case_named_params/mysql/schema.sql +++ b/internal/endtoend/testdata/case_named_params/mysql/schema.sql @@ -2,8 +2,8 @@ CREATE TABLE authors ( id BIGINT PRIMARY KEY, - username TEXT NULL, - email TEXT NULL, + username VARCHAR(10) NULL, + email VARCHAR(10) NULL, name TEXT NOT NULL, bio TEXT, UNIQUE KEY idx_username (username), 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c760534701..34088348d6 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.23.0 +// sqlc v1.30.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 de65c3117d..fda09df343 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/case_named_params/sqlite/go/db.go b/internal/endtoend/testdata/case_named_params/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_named_params/sqlite/go/models.go b/internal/endtoend/testdata/case_named_params/sqlite/go/models.go new file mode 100644 index 0000000000..72d21e0408 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/sqlite/go/models.go @@ -0,0 +1,17 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Username interface{} + Email interface{} + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/case_named_params/sqlite/go/query.sql.go b/internal/endtoend/testdata/case_named_params/sqlite/go/query.sql.go new file mode 100644 index 0000000000..296eef7593 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/sqlite/go/query.sql.go @@ -0,0 +1,36 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listAuthors = `-- name: ListAuthors :one +SELECT id, username, email, name, bio +FROM authors +WHERE email = CASE WHEN ?1 = '' then NULL else ?1 END + OR username = CASE WHEN ?2 = '' then NULL else ?2 END +LIMIT 1 +` + +type ListAuthorsParams struct { + Email interface{} + Username interface{} +} + +func (q *Queries) ListAuthors(ctx context.Context, arg ListAuthorsParams) (Author, error) { + row := q.db.QueryRowContext(ctx, listAuthors, arg.Email, arg.Username) + var i Author + err := row.Scan( + &i.ID, + &i.Username, + &i.Email, + &i.Name, + &i.Bio, + ) + return i, err +} diff --git a/internal/endtoend/testdata/case_named_params/sqlite/query.sql b/internal/endtoend/testdata/case_named_params/sqlite/query.sql new file mode 100644 index 0000000000..39d990902a --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/sqlite/query.sql @@ -0,0 +1,6 @@ +-- name: ListAuthors :one +SELECT * +FROM authors +WHERE email = CASE WHEN sqlc.arg(email) = '' then NULL else sqlc.arg(email) END + OR username = CASE WHEN sqlc.arg(username) = '' then NULL else sqlc.arg(username) END +LIMIT 1; diff --git a/internal/endtoend/testdata/case_named_params/sqlite/schema.sql b/internal/endtoend/testdata/case_named_params/sqlite/schema.sql new file mode 100644 index 0000000000..0d6facced1 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/sqlite/schema.sql @@ -0,0 +1,8 @@ +CREATE TABLE authors ( + id INTEGER PRIMARY KEY, + username TEXT NULL, + email TEXT NULL, + name TEXT NOT NULL, + bio TEXT +); + diff --git a/internal/endtoend/testdata/case_named_params/sqlite/sqlc.json b/internal/endtoend/testdata/case_named_params/sqlite/sqlc.json new file mode 100644 index 0000000000..95b9cd09c0 --- /dev/null +++ b/internal/endtoend/testdata/case_named_params/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "sqlite", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/case_sensitive/sqlite/go/db.go b/internal/endtoend/testdata/case_sensitive/sqlite/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f34509ca58..fe54e54809 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.23.0 +// sqlc v1.30.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 59962a73e7..b6c08e7713 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 7ee60b0ba3..48d37ec374 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 7ee60b0ba3..48d37ec374 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go +++ b/internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 882fcd11ae..1bd6efb852 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/case_text/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/case_text/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 f2895f28b6..fe8d84420e 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/case_text/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/case_text/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 f2895f28b6..fe8d84420e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/case_text/stdlib/go/models.go +++ b/internal/endtoend/testdata/case_text/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 7333171910..5856ff2f69 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b3e57f38bd..aa87e2f1af 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.23.0 +// sqlc v1.30.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 80b429537c..97330eb75e 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 25fe62ad4b..9b6177de7b 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.23.0 +// sqlc v1.30.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 733672c888..e0c352e43b 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 0663ad73db..9d1e88143a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0dab5332e7..f2fbf9abf3 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.23.0 +// sqlc v1.30.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 0663ad73db..9d1e88143a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 002d03a82b..a155d78efe 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 ca154cc887..112ea86167 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0dab5332e7..f2fbf9abf3 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.23.0 +// sqlc v1.30.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 bd9728c454..65118d0419 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 29a9a76d14..627477f66f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 6a2ad52d77..c20d34bc5f 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.23.0 +// sqlc v1.30.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 bce72ebea5..3fad3fbb46 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 052c3349aa..42b69e9729 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.23.0 +// sqlc v1.30.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 2a39c1cfa5..3e37867bec 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 09fe103a20..a8133f8ace 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.23.0 +// sqlc v1.30.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 2a39c1cfa5..3e37867bec 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/citext/pgx/go/models.go b/internal/endtoend/testdata/citext/pgx/go/models.go index b8aded722a..ca947ee379 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.23.0 +// sqlc v1.30.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 ed172caf63..6e5d9e9855 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/citext/stdlib/go/models.go b/internal/endtoend/testdata/citext/stdlib/go/models.go index b8aded722a..ca947ee379 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.23.0 +// sqlc v1.30.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 dac4ce2de7..10f3e1fb7b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/mysql/go/models.go b/internal/endtoend/testdata/coalesce/mysql/go/models.go index b8aded722a..ca947ee379 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.23.0 +// sqlc v1.30.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 fd23a9314a..d3676747e9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 39562698eb..9ba63f911e 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.23.0 +// sqlc v1.30.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 6cf437863f..4d4c47b82f 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 bc34b38851..4bad9f8d4d 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.23.0 +// sqlc v1.30.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 d8af028405..cd31d38719 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 39562698eb..9ba63f911e 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.23.0 +// sqlc v1.30.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 2aa6aba82c..5b1398ea52 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/coalesce/sqlite/go/models.go b/internal/endtoend/testdata/coalesce/sqlite/go/models.go index b8aded722a..ca947ee379 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.23.0 +// sqlc v1.30.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 fd23a9314a..d3676747e9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f6c39ce98a..1d0ec38f48 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.23.0 +// sqlc v1.30.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 315460e3a3..b695d58d52 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 caf82fc2df..fec76da088 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.23.0 +// sqlc v1.30.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 18e97183ac..c78eee2cb8 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e567deaeda..d03557129d 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.23.0 +// sqlc v1.30.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 e3bc4c901a..ca18c2b954 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 caf82fc2df..fec76da088 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.23.0 +// sqlc v1.30.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 1cde812d84..5dc871d4ca 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e567deaeda..d03557129d 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.23.0 +// sqlc v1.30.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 315460e3a3..b695d58d52 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e567deaeda..d03557129d 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.23.0 +// sqlc v1.30.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 315460e3a3..b695d58d52 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7d2a727f99..d093635683 100644 --- a/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go +++ b/internal/endtoend/testdata/coalesce_join/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 9e26dcf1e7..4d0489e792 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_params/mysql/exec.json b/internal/endtoend/testdata/coalesce_params/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/coalesce_params/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} diff --git a/internal/endtoend/testdata/coalesce_params/mysql/go/db.go b/internal/endtoend/testdata/coalesce_params/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2df78057a5..39606e4aaf 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.23.0 +// sqlc v1.30.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 59a2697023..7bb5de9694 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/coalesce_params/mysql/schema.sql b/internal/endtoend/testdata/coalesce_params/mysql/schema.sql index a0d41cbe74..0b1b34685c 100644 --- a/internal/endtoend/testdata/coalesce_params/mysql/schema.sql +++ b/internal/endtoend/testdata/coalesce_params/mysql/schema.sql @@ -14,7 +14,7 @@ CREATE TABLE `Calendar` ( KEY `Relation` (`Relation`), KEY `UniqueKey` (`UniqueKey`), KEY `IdKey` (`IdKey`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `Event` ( @@ -32,7 +32,7 @@ CREATE TABLE `Event` ( KEY `CalendarReference` (`CalendarReference`), KEY `UniqueKey` (`UniqueKey`), KEY `IdKey` (`IdKey`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE authors ( diff --git a/internal/endtoend/testdata/codegen_json/gen/codegen.json b/internal/endtoend/testdata/codegen_json/gen/codegen.json index 3b23ef192e..754d2af289 100644 --- a/internal/endtoend/testdata/codegen_json/gen/codegen.json +++ b/internal/endtoend/testdata/codegen_json/gen/codegen.json @@ -8,8 +8,6 @@ "queries": [ "postgresql/query.sql" ], - "rename": {}, - "overrides": [], "codegen": { "out": "", "plugin": "", @@ -65365,6 +65363,7 @@ "insert_into_table": null } ], - "sqlc_version": "v1.23.0", - "plugin_options": "eyJvdXQiOiJnZW4iLCJpbmRlbnQiOiIgICIsImZpbGVuYW1lIjoiY29kZWdlbi5qc29uIn0=" + "sqlc_version": "v1.30.0", + "plugin_options": "eyJvdXQiOiJnZW4iLCJpbmRlbnQiOiIgICIsImZpbGVuYW1lIjoiY29kZWdlbi5qc29uIn0=", + "global_options": "" } 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0335bf5ab9..3dff0f3bae 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.23.0 +// sqlc v1.30.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 f16ce6e82d..4d63368825 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e1d39ccb7d..05352919de 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.23.0 +// sqlc v1.30.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 02fe4ce6de..9de0be747c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/column_as/mysql/go/models.go +++ b/internal/endtoend/testdata/column_as/mysql/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 6c35ed6ff9..bb26fb91ca 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 dd3267d8e8..dd8604891b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 dd3267d8e8..dd8604891b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 6c35ed6ff9..bb26fb91ca 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/column_as/sqlite/go/models.go +++ b/internal/endtoend/testdata/column_as/sqlite/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 fdc076b82a..4c77f808c1 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 0bf9e0b1f4..a31a016362 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0dab5332e7..f2fbf9abf3 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.23.0 +// sqlc v1.30.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 e4258380d6..1bd9065b43 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.23.0 +// sqlc v1.30.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 0c24084df1..7599fccb42 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 9d9a42627a..a0358ab4ed 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.23.0 +// sqlc v1.30.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 eecc083931..166695c170 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.23.0 +// sqlc v1.30.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 0dab5332e7..f2fbf9abf3 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.23.0 +// sqlc v1.30.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 005cd883de..533edb506b 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 579c8ecbd7..33105da087 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.23.0 +// sqlc v1.30.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 d61724f507..33c4edd32e 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 579c8ecbd7..33105da087 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.23.0 +// sqlc v1.30.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 d61724f507..33c4edd32e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 579c8ecbd7..33105da087 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.23.0 +// sqlc v1.30.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 16c1515ec2..8a65a0cb31 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 b7aaffef01..2e94b32488 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 353741967c..ac5869164a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0dab5332e7..f2fbf9abf3 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.23.0 +// sqlc v1.30.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 e62030f5d2..752470ce02 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 7da1151467..6e2a2003ab 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 56bfd47fec..92ddc7826f 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.23.0 +// sqlc v1.30.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 7da1151467..6e2a2003ab 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/mysql/go/models.go b/internal/endtoend/testdata/comparisons/mysql/go/models.go index da0f666392..65820844a6 100644 --- a/internal/endtoend/testdata/comparisons/mysql/go/models.go +++ b/internal/endtoend/testdata/comparisons/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 } diff --git a/internal/endtoend/testdata/comparisons/mysql/go/query.sql.go b/internal/endtoend/testdata/comparisons/mysql/go/query.sql.go index 2074d499fe..4289448bd8 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 82e696034a..2f19b196be 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 82e696034a..2f19b196be 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 8fad0c6cf3..039e8ac630 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/comparisons/sqlite/go/models.go b/internal/endtoend/testdata/comparisons/sqlite/go/models.go index 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/comparisons/sqlite/go/models.go +++ b/internal/endtoend/testdata/comparisons/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } diff --git a/internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go b/internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go index 8fad0c6cf3..039e8ac630 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8ba025bc17..6ed24d1fa0 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.23.0 +// sqlc v1.30.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 2b0b1b78b7..1c12c60296 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8ba025bc17..6ed24d1fa0 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.23.0 +// sqlc v1.30.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 2b0b1b78b7..1c12c60296 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8ba025bc17..6ed24d1fa0 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.23.0 +// sqlc v1.30.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 a3874e7169..a21cb4bfdb 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 f33ababb56..5b44f5b1ae 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.23.0 +// sqlc v1.30.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 84a849dde6..85ba941f35 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.23.0 +// sqlc v1.30.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 f0735f7dac..7011f902d0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/copyfrom/mysql/go/models.go b/internal/endtoend/testdata/copyfrom/mysql/go/models.go index 8e90a715b3..f8aabf5067 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.23.0 +// sqlc v1.30.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 f81e568e08..730ffecd49 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.23.0 +// sqlc v1.30.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 04c6995c57..62f36b2dd4 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.23.0 +// sqlc v1.30.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 d46100f608..060bdb6aa5 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.23.0 +// sqlc v1.30.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 4085d1869c..f0e5a24373 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.23.0 +// sqlc v1.30.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 8c403c2a37..bd6afe1e9f 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.23.0 +// sqlc v1.30.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 0d31151364..b48a3b26eb 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.23.0 +// sqlc v1.30.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 dd95e077cf..d013e204cf 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.23.0 +// sqlc v1.30.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 0d76aa6e17..9243b4b89a 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.23.0 +// sqlc v1.30.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 4d60a0605d..7226216da5 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.23.0 +// sqlc v1.30.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 de33005d06..e64286494d 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.23.0 +// sqlc v1.30.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 2f39bec061..9f474061dd 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.23.0 +// sqlc v1.30.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 025b3165b2..3d0ea89eb3 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.23.0 +// sqlc v1.30.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 d46100f608..060bdb6aa5 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.23.0 +// sqlc v1.30.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 4085d1869c..f0e5a24373 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.23.0 +// sqlc v1.30.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 3747e3d243..69714fb64d 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.23.0 +// sqlc v1.30.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 025b3165b2..3d0ea89eb3 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.23.0 +// sqlc v1.30.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 0d76aa6e17..9243b4b89a 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.23.0 +// sqlc v1.30.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 4d60a0605d..7226216da5 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.23.0 +// sqlc v1.30.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 9c9857932c..33ce4a1458 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/copyfrom.go new file mode 100644 index 0000000000..7baf05c8ab --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/copyfrom.go @@ -0,0 +1,51 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: copyfrom.go + +package querytest + +import ( + "context" + "fmt" + "io" + "sync/atomic" + + "github.com/go-sql-driver/mysql" + "github.com/hexon/mysqltsv" +) + +var readerHandlerSequenceForInsertMultipleValues uint32 = 1 + +func convertRowsForInsertMultipleValues(w *io.PipeWriter, arg []InsertMultipleValuesParams) { + e := mysqltsv.NewEncoder(w, 2, nil) + for _, row := range arg { + e.AppendValue(row.A) + e.AppendValue(row.B) + } + w.CloseWithError(e.Close()) +} + +// InsertMultipleValues uses MySQL's LOAD DATA LOCAL INFILE and is not atomic. +// +// Errors and duplicate keys are treated as warnings and insertion will +// continue, even without an error for some cases. Use this in a transaction +// and use SHOW WARNINGS to check for any problems and roll back if you want to. +// +// Check the documentation for more information: +// https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-error-handling +func (q *Queries) InsertMultipleValues(ctx context.Context, arg []InsertMultipleValuesParams) (int64, error) { + pr, pw := io.Pipe() + defer pr.Close() + rh := fmt.Sprintf("InsertMultipleValues_%d", atomic.AddUint32(&readerHandlerSequenceForInsertMultipleValues, 1)) + mysql.RegisterReaderHandler(rh, func() io.Reader { return pr }) + defer mysql.DeregisterReaderHandler(rh) + go convertRowsForInsertMultipleValues(pw, arg) + // The string interpolation is necessary because LOAD DATA INFILE requires + // the file name to be given as a literal string. + result, err := q.db.ExecContext(ctx, fmt.Sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE `foo` %s (a, b)", "Reader::"+rh, mysqltsv.Escaping)) + if err != nil { + return 0, err + } + return result.RowsAffected() +} diff --git a/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/db.go b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/copyfrom_multicolumn_parameter_limit/mysql/go/models.go b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/models.go new file mode 100644 index 0000000000..de35bade9f --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Foo struct { + A sql.NullString + B sql.NullString +} diff --git a/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/query.sql.go b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/query.sql.go new file mode 100644 index 0000000000..987547dff5 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/query.sql.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "database/sql" +) + +const insertMultipleValues = `-- name: InsertMultipleValues :copyfrom +INSERT INTO foo (a, b) VALUES (?, ?) +` + +type InsertMultipleValuesParams struct { + A sql.NullString + B sql.NullString +} diff --git a/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/query.sql b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/query.sql new file mode 100644 index 0000000000..18a13f88e6 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/query.sql @@ -0,0 +1,2 @@ +-- name: InsertMultipleValues :copyfrom +INSERT INTO foo (a, b) VALUES (?, ?); diff --git a/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/schema.sql b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/schema.sql new file mode 100644 index 0000000000..dd2f6b6b50 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (a text, b text); diff --git a/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/sqlc.json b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/sqlc.json new file mode 100644 index 0000000000..0990bc2fef --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/sqlc.json @@ -0,0 +1,15 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "sql_package": "database/sql", + "sql_driver": "github.com/go-sql-driver/mysql", + "engine": "mysql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql", + "query_parameter_limit": 4 + } + ] +} 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 ff9c30b4e1..99466c2d2e 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.23.0 +// sqlc v1.30.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 0d76aa6e17..9243b4b89a 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.23.0 +// sqlc v1.30.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 4aab6be8d8..f19c58e317 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 6e492150c2..94994f8fe9 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,12 +1,10 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest -import () - type StageUserDataParams struct { IDParam string UserParam string 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 5ba8a84272..76754b4c2f 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.23.0 +// sqlc v1.30.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 d46100f608..060bdb6aa5 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.23.0 +// sqlc v1.30.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 cf61e310d7..188bf74be1 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Author struct { AuthorID int32 } 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 53d71d8aad..c7d4e8c0f8 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.23.0 +// sqlc v1.30.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 a6a0b2f99e..a80cdbd2f0 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,8 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest - -import () 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 5ba8a84272..76754b4c2f 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.23.0 +// sqlc v1.30.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 0d76aa6e17..9243b4b89a 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.23.0 +// sqlc v1.30.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 cf61e310d7..188bf74be1 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Author struct { AuthorID int32 } 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 53d71d8aad..c7d4e8c0f8 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.23.0 +// sqlc v1.30.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 a6a0b2f99e..a80cdbd2f0 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,8 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest - -import () diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/issue.md b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/issue.md new file mode 100644 index 0000000000..4838ed77c2 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/3443 \ No newline at end of file diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/copyfrom.go b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/copyfrom.go new file mode 100644 index 0000000000..7b5e8e4a32 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/copyfrom.go @@ -0,0 +1,50 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: copyfrom.go + +package querytest + +import ( + "context" + "fmt" + "io" + "sync/atomic" + + "github.com/go-sql-driver/mysql" + "github.com/hexon/mysqltsv" +) + +var readerHandlerSequenceForInsertSingleValue uint32 = 1 + +func convertRowsForInsertSingleValue(w *io.PipeWriter, arg []InsertSingleValueParams) { + e := mysqltsv.NewEncoder(w, 1, nil) + for _, row := range arg { + e.AppendValue(row.A) + } + w.CloseWithError(e.Close()) +} + +// InsertSingleValue uses MySQL's LOAD DATA LOCAL INFILE and is not atomic. +// +// Errors and duplicate keys are treated as warnings and insertion will +// continue, even without an error for some cases. Use this in a transaction +// and use SHOW WARNINGS to check for any problems and roll back if you want to. +// +// Check the documentation for more information: +// https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-error-handling +func (q *Queries) InsertSingleValue(ctx context.Context, arg []InsertSingleValueParams) (int64, error) { + pr, pw := io.Pipe() + defer pr.Close() + rh := fmt.Sprintf("InsertSingleValue_%d", atomic.AddUint32(&readerHandlerSequenceForInsertSingleValue, 1)) + mysql.RegisterReaderHandler(rh, func() io.Reader { return pr }) + defer mysql.DeregisterReaderHandler(rh) + go convertRowsForInsertSingleValue(pw, arg) + // The string interpolation is necessary because LOAD DATA INFILE requires + // the file name to be given as a literal string. + result, err := q.db.ExecContext(ctx, fmt.Sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE `foo` %s (a)", "Reader::"+rh, mysqltsv.Escaping)) + if err != nil { + return 0, err + } + return result.RowsAffected() +} diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/db.go b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/copyfrom_singlecolumn_struct_only/mysql/go/models.go b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/models.go new file mode 100644 index 0000000000..ef22c3818c --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Foo struct { + A sql.NullString +} diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/query.sql.go b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/query.sql.go new file mode 100644 index 0000000000..133d1b64ed --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/query.sql.go @@ -0,0 +1,18 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "database/sql" +) + +const insertSingleValue = `-- name: InsertSingleValue :copyfrom +INSERT INTO foo (a) VALUES (?) +` + +type InsertSingleValueParams struct { + A sql.NullString +} diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/query.sql b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/query.sql new file mode 100644 index 0000000000..091c90316b --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/query.sql @@ -0,0 +1,2 @@ +-- name: InsertSingleValue :copyfrom +INSERT INTO foo (a) VALUES (?); diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/schema.sql b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/schema.sql new file mode 100644 index 0000000000..022bbd6f91 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (a text); diff --git a/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/sqlc.json b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/sqlc.json new file mode 100644 index 0000000000..4a4d43c146 --- /dev/null +++ b/internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/sqlc.json @@ -0,0 +1,15 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "sql_package": "database/sql", + "sql_driver": "github.com/go-sql-driver/mysql", + "engine": "mysql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql", + "query_parameter_limit": 0 + } + ] +} diff --git a/internal/endtoend/testdata/count_star/mysql/go/db.go b/internal/endtoend/testdata/count_star/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 da0f666392..65820844a6 100644 --- a/internal/endtoend/testdata/count_star/mysql/go/models.go +++ b/internal/endtoend/testdata/count_star/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 } 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 061ab41afc..de91b29d08 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 f7db1e2a70..2f3daa3ac0 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 f7db1e2a70..2f3daa3ac0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 061ab41afc..de91b29d08 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/count_star/sqlite/go/models.go +++ b/internal/endtoend/testdata/count_star/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 061ab41afc..de91b29d08 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7140f3bbe1..ef71ea2fe9 100644 --- a/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go +++ b/internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Val string } 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 0d356ae8d3..4e81626c20 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7619f3aa3c..342b0365d1 100644 --- a/internal/endtoend/testdata/create_table_as/postgresql/go/models.go +++ b/internal/endtoend/testdata/create_table_as/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Val string } 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 5c8e7f6fed..e5b7ce3617 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3826341d0d..6bf0efbef0 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.23.0 +// sqlc v1.30.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 add2def4c8..850a585294 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3826341d0d..6bf0efbef0 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.23.0 +// sqlc v1.30.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 add2def4c8..850a585294 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b07b1f2d7f..ff7893834a 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.23.0 +// sqlc v1.30.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 94bc5e6a53..8f9c3c7c1a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b07b1f2d7f..ff7893834a 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.23.0 +// sqlc v1.30.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 2cb96f0606..65aa0b1479 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 396c985f28..681d1840a6 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.23.0 +// sqlc v1.30.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 192691595d..f7b6baa8db 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_count/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_count/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 569b8217c8..02370c4c8f 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cte_count/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 6e748da119..e8af35fbd1 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cte_count/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 6e748da119..e8af35fbd1 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_count/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_count/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 569b8217c8..02370c4c8f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_filter/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_filter/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 c799488e26..fd0e7ce6b2 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 2d877340e5..e4c0e1929f 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 2d877340e5..e4c0e1929f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a83cb3aa20..4dc79596a7 100644 --- a/internal/endtoend/testdata/cte_filter/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_filter/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Ready bool } 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 e5a966532c..9901a70cda 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8d442ca188..6561330c86 100644 --- a/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go +++ b/internal/endtoend/testdata/cte_in_delete/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Ready bool 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 c097cc53e1..2c4020efb7 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8d442ca188..6561330c86 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Ready bool 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 b7b789010b..9a208d5a93 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8d442ca188..6561330c86 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Ready bool 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 b7b789010b..9a208d5a93 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8d442ca188..6561330c86 100644 --- a/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go +++ b/internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Ready bool 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 1c4f67f9d5..80518dd3f6 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 04a58a1cdd..5af8af896a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 c5282094a8..c419896180 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.23.0 +// sqlc v1.30.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 776a4a9587..564b33b190 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -28,11 +28,6 @@ FROM 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_multiple_alias/postgresql/pgx/go/db.go b/internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go index 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 c5282094a8..c419896180 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.23.0 +// sqlc v1.30.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 0dd2115a9a..58da3af00e 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 42bf218044..e4cf9d17ae 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.23.0 +// sqlc v1.30.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 37c71837db..638f195915 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 1f22a81efb..66712f9d55 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.23.0 +// sqlc v1.30.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 a211d510b0..ffbdb1c99e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 1f22a81efb..66712f9d55 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.23.0 +// sqlc v1.30.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 0f96eb3dcd..39bff8ef3c 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 c7f80f00a8..e9542cf1ee 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.23.0 +// sqlc v1.30.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 8b62d4c9e6..84d8605338 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 1f22a81efb..66712f9d55 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.23.0 +// sqlc v1.30.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 f3ad3ab423..696ebde8f8 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 2aa1639ed4..eae1c96e75 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.23.0 +// sqlc v1.30.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 a08eaccacd..50ffa78909 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 71fc9bf3e6..cfa14619bf 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.23.0 +// sqlc v1.30.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 19b6703b23..871349d074 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 2d5c6741f5..53c5c498a6 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.23.0 +// sqlc v1.30.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 15e030a337..e6b4cbafa5 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9e1c702c30..09908991ae 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.23.0 +// sqlc v1.30.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 30f01c3374..690a024aed 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index cb19ca99f5..867481daf8 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0872bda465..f5d93f6f97 100644 --- a/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Attribute struct { ID int64 Name string 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 0147e90e58..61ba601b90 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 43de6cd5da..b82677933d 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.23.0 +// sqlc v1.30.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 c57add03fb..15890aef3f 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 68262ce6cc..e95830d5ab 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.23.0 +// sqlc v1.30.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 3e276bc8da..a743dd6e3b 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 ba09dbeb51..2b50ab0e55 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.23.0 +// sqlc v1.30.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 11045c1ea9..d591b51676 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 34a555b621..dfbf6aeb32 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.23.0 +// sqlc v1.30.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 81d21a758c..9d705cd685 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a212507af6..8473f52a9e 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.23.0 +// sqlc v1.30.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 81d21a758c..9d705cd685 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 34a555b621..dfbf6aeb32 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.23.0 +// sqlc v1.30.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 a2a3f9140c..9527500b60 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 cc79caeec0..7cd3cb8dce 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.23.0 +// sqlc v1.30.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 07e9ad6ab0..b76767679c 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.23.0 +// sqlc v1.30.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 dcbffc39cb..0a639a6476 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/mysql/go/models.go b/internal/endtoend/testdata/datatype/mysql/go/models.go index 0a2c892aad..8e15cde168 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.23.0 +// sqlc v1.30.0 package datatype @@ -54,8 +54,8 @@ type DtDatetimeNotNull struct { type DtNumeric struct { A sql.NullInt32 B sql.NullInt32 - C sql.NullInt32 - D sql.NullInt32 + C sql.NullInt16 + D sql.NullInt16 E sql.NullInt32 F sql.NullInt64 G interface{} @@ -69,8 +69,8 @@ type DtNumeric struct { type DtNumericNotNull struct { A int32 B int32 - C int32 - D int32 + C int8 + D int16 E int32 F int64 G interface{} @@ -84,8 +84,8 @@ type DtNumericNotNull struct { type DtNumericUnsigned struct { A sql.NullInt32 B sql.NullInt32 - C sql.NullInt32 - D sql.NullInt32 + C sql.NullInt16 + D sql.NullInt16 E sql.NullInt32 F sql.NullInt64 } diff --git a/internal/endtoend/testdata/datatype/mysql/go/query.sql.go b/internal/endtoend/testdata/datatype/mysql/go/query.sql.go new file mode 100644 index 0000000000..4720927d0a --- /dev/null +++ b/internal/endtoend/testdata/datatype/mysql/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/datatype/mysql/sql/query.sql b/internal/endtoend/testdata/datatype/mysql/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/datatype/mysql/sql/query.sql +++ b/internal/endtoend/testdata/datatype/mysql/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/datatype/pgx/v4/go/db.go b/internal/endtoend/testdata/datatype/pgx/v4/go/db.go index 7fd32d6893..4e47262b7d 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.23.0 +// sqlc v1.30.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 e959d5b3ce..6069c4a25c 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/datatype/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..3a1b6bccec --- /dev/null +++ b/internal/endtoend/testdata/datatype/pgx/v4/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/datatype/pgx/v4/sql/query.sql b/internal/endtoend/testdata/datatype/pgx/v4/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/datatype/pgx/v4/sql/query.sql +++ b/internal/endtoend/testdata/datatype/pgx/v4/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/datatype/pgx/v5/go/db.go b/internal/endtoend/testdata/datatype/pgx/v5/go/db.go index 7d61537ef5..2853d5f77e 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.23.0 +// sqlc v1.30.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 acfcceb45b..49a90357c5 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/datatype/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..3a1b6bccec --- /dev/null +++ b/internal/endtoend/testdata/datatype/pgx/v5/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/datatype/pgx/v5/sql/query.sql b/internal/endtoend/testdata/datatype/pgx/v5/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/datatype/pgx/v5/sql/query.sql +++ b/internal/endtoend/testdata/datatype/pgx/v5/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/datatype/sqlite/go/db.go b/internal/endtoend/testdata/datatype/sqlite/go/db.go index dcbffc39cb..0a639a6476 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/sqlite/go/models.go b/internal/endtoend/testdata/datatype/sqlite/go/models.go index 9e675e44aa..277f6abedf 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/sqlite/go/query.sql.go b/internal/endtoend/testdata/datatype/sqlite/go/query.sql.go new file mode 100644 index 0000000000..a92313d1a7 --- /dev/null +++ b/internal/endtoend/testdata/datatype/sqlite/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int64 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/datatype/sqlite/sql/query.sql b/internal/endtoend/testdata/datatype/sqlite/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/datatype/sqlite/sql/query.sql +++ b/internal/endtoend/testdata/datatype/sqlite/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/datatype/stdlib/go/db.go b/internal/endtoend/testdata/datatype/stdlib/go/db.go index dcbffc39cb..0a639a6476 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/stdlib/go/models.go b/internal/endtoend/testdata/datatype/stdlib/go/models.go index 67c9bc0399..691793cbdd 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/datatype/stdlib/go/query.sql.go b/internal/endtoend/testdata/datatype/stdlib/go/query.sql.go new file mode 100644 index 0000000000..4720927d0a --- /dev/null +++ b/internal/endtoend/testdata/datatype/stdlib/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/datatype/stdlib/sql/query.sql b/internal/endtoend/testdata/datatype/stdlib/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/datatype/stdlib/sql/query.sql +++ b/internal/endtoend/testdata/datatype/stdlib/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; 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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 559b5647b6..bbb0117133 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.23.0 +// sqlc v1.30.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 f31e7367f4..b5390d928e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 bd06ad71ab..b7e6d70cba 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 456e99b3a3..2ac3331027 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 3a8a73be94..acf9e070a2 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 456e99b3a3..2ac3331027 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b280d3c7c4..ba83d3d792 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.23.0 +// sqlc v1.30.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 784179b6ee..c388865458 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 216f58db05..115508d2bc 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Baz string 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 216f58db05..115508d2bc 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Baz string 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 216f58db05..115508d2bc 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Baz string 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8f616db471..15660dccd1 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 afc66964d9..957c613690 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar []string } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 afc66964d9..957c613690 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar []string } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 afc66964d9..957c613690 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar []string } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/db.go b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/ddl_alter_table_case_sensitivity/sqlite/go/models.go b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/models.go new file mode 100644 index 0000000000..3ec65a53d1 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/models.go @@ -0,0 +1,16 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type User struct { + ID int64 + FullName sql.NullString + EmailAddress sql.NullString + CreatedAt sql.NullString +} diff --git a/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/query.sql.go b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/query.sql.go new file mode 100644 index 0000000000..610c92c218 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/query.sql.go @@ -0,0 +1,60 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" +) + +const insertUser = `-- name: InsertUser :exec +INSERT INTO Users (full_name, "EmailAddress", created_at) +VALUES (?, ?, ?) +` + +type InsertUserParams struct { + FullName sql.NullString + EmailAddress sql.NullString + CreatedAt sql.NullString +} + +func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) error { + _, err := q.db.ExecContext(ctx, insertUser, arg.FullName, arg.EmailAddress, arg.CreatedAt) + return err +} + +const selectUsers = `-- name: SelectUsers :many +SELECT id, full_name, "EmailAddress", created_at +FROM Users +` + +func (q *Queries) SelectUsers(ctx context.Context) ([]User, error) { + rows, err := q.db.QueryContext(ctx, selectUsers) + 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.FullName, + &i.EmailAddress, + &i.CreatedAt, + ); 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/ddl_alter_table_case_sensitivity/sqlite/query.sql b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/query.sql new file mode 100644 index 0000000000..79989697e8 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/query.sql @@ -0,0 +1,7 @@ +-- name: InsertUser :exec +INSERT INTO Users (full_name, "EmailAddress", created_at) +VALUES (?, ?, ?); + +-- name: SelectUsers :many +SELECT id, full_name, "EmailAddress", created_at +FROM Users; diff --git a/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/schema.sql b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/schema.sql new file mode 100644 index 0000000000..5b8af0ac35 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/schema.sql @@ -0,0 +1,10 @@ +-- Test ALTER TABLE operations with mixed case table and column names +-- Verifies consistent handling of case sensitivity in DDL operations +CREATE TABLE Users (id integer primary key, name text, "Email" text); + +-- Test renaming columns with different case formats +ALTER TABLE Users RENAME COLUMN name TO full_name; +ALTER TABLE Users RENAME COLUMN "Email" TO "EmailAddress"; + +-- Test adding a simple column +ALTER TABLE Users ADD COLUMN created_at text; diff --git a/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/sqlc.json b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/sqlc.json new file mode 100644 index 0000000000..cd66df063b --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "sqlite", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 a3333d5614..59658163a8 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Baz string } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a3333d5614..59658163a8 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Baz string } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a3333d5614..59658163a8 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Baz string } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f85f0556f2..4a41234e03 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 f85f0556f2..4a41234e03 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 648e7aa3e6..e662ac1daa 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f85f0556f2..4a41234e03 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 325b22801f..09cfadd9e7 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 b7b8332506..da6e0a8d41 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/exec.json b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b46ccf3fcd..d0184b2aec 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,10 +1,8 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 b46ccf3fcd..d0184b2aec 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,10 +1,8 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 b46ccf3fcd..d0184b2aec 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,10 +1,8 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b46ccf3fcd..d0184b2aec 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,10 +1,8 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/exec.json b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2f46943256..de9a55960a 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Venue struct { ID uint64 } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 602545e64c..1944ccee84 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Venue struct { ID int32 } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 602545e64c..1944ccee84 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Venue struct { ID int32 } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 602545e64c..1944ccee84 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Venue struct { ID int32 } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 d8681a68ef..8a05f10ef2 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 c3219c58bf..37aa1e6042 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d8681a68ef..8a05f10ef2 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 6ae3a59899..fef18087e2 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 67575e9d74..019c765b19 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 263a6d826d..c3cac35296 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 67575e9d74..019c765b19 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 67575e9d74..019c765b19 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.23.0 +// sqlc v1.30.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 3ca1e534a5..f224de356f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 325b22801f..09cfadd9e7 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 faf895016e..67a0efc68c 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 29b436da93..927fff0f36 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.23.0 +// sqlc v1.30.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 7d53ed0953..c9e55c9583 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 368c0a1593..06e143d2bd 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 fe739d4840..33e41a2fea 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e2b177cdc4..8a716e4f7a 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 fe739d4840..33e41a2fea 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 90b4584f2c..0cd442222e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 90b4584f2c..0cd442222e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 90b4584f2c..0cd442222e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string } 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 90b4584f2c..0cd442222e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string } 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 c74b485504..3d7be3b20f 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.23.0 +// sqlc v1.30.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 8f424a5fbc..9e6b8735c7 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8b6941795a..8e1f8559b0 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.23.0 +// sqlc v1.30.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 f2d71ada34..01336b0e2f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c74b485504..3d7be3b20f 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.23.0 +// sqlc v1.30.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 92e3aa7bee..fbff09c49d 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e1e727b66a..f539efec15 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e1e727b66a..f539efec15 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e1e727b66a..f539efec15 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 94acf1a682..34a1484113 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.23.0 +// sqlc v1.30.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 fd541b74d3..01b4373918 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 94acf1a682..34a1484113 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.23.0 +// sqlc v1.30.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 fd541b74d3..01b4373918 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 94acf1a682..34a1484113 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.23.0 +// sqlc v1.30.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 fac7e6b5bd..89a510acd2 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 94acf1a682..34a1484113 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.23.0 +// sqlc v1.30.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 fd541b74d3..01b4373918 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 94acf1a682..34a1484113 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.23.0 +// sqlc v1.30.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 fd541b74d3..01b4373918 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 94acf1a682..34a1484113 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.23.0 +// sqlc v1.30.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 fac7e6b5bd..89a510acd2 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 a42050888a..3b2d5ea724 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a42050888a..3b2d5ea724 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a42050888a..3b2d5ea724 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 66e04dd7da..01922dfc08 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.23.0 +// sqlc v1.30.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 4a299762c1..6ad1109d83 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 66e04dd7da..01922dfc08 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.23.0 +// sqlc v1.30.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 4a299762c1..6ad1109d83 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 66e04dd7da..01922dfc08 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.23.0 +// sqlc v1.30.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 3f5d83bf94..991a72e41c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 37cbcd2289..f81de56f8a 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 80f83332ea..21fb81be1d 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 21c4804c5b..7a69cf3252 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 80f83332ea..21fb81be1d 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d5a87ecb6c..bceedb5629 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.23.0 +// sqlc v1.30.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 6fea32d9c0..279c549bd6 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 45c1427618..6a0cfe3560 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.23.0 +// sqlc v1.30.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 4751c802ed..3cbd273217 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 45c1427618..6a0cfe3560 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.23.0 +// sqlc v1.30.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 4751c802ed..3cbd273217 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 45c1427618..6a0cfe3560 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.23.0 +// sqlc v1.30.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 22ddbeebd4..620055c43c 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_func_exists/exec.json b/internal/endtoend/testdata/ddl_create_func_exists/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_func_exists/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c60ad972b4..f4ed97c5d2 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.23.0 +// sqlc v1.30.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 dab1211f0b..bf5b8f5890 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 c60ad972b4..f4ed97c5d2 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.23.0 +// sqlc v1.30.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 30ff6348bf..3b04c9af76 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 b61a16f670..aeb0ffd1ff 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.23.0 +// sqlc v1.30.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 30ff6348bf..3b04c9af76 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c60ad972b4..f4ed97c5d2 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.23.0 +// sqlc v1.30.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 4db2624084..b7059b0a78 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 44b2a9919f..c43b161fde 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 44b2a9919f..c43b161fde 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 b2e536a758..81249afc4a 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 44b2a9919f..c43b161fde 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 44b2a9919f..c43b161fde 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 5a13450d78..4c34036e2c 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 d9144e5281..dbc5cbd8b1 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 5a13450d78..4c34036e2c 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8a1b545d89..87aff71db6 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.23.0 +// sqlc v1.30.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 3f32515737..4caab44ccb 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 7b7a8f43ed..2cbc4b68a6 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.23.0 +// sqlc v1.30.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 3f32515737..4caab44ccb 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8a1b545d89..87aff71db6 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.23.0 +// sqlc v1.30.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 2fccd06260..fe4b5e86fa 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/exec.json b/internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} diff --git a/internal/endtoend/testdata/ddl_create_table_like/issue.md b/internal/endtoend/testdata/ddl_create_table_like/issue.md new file mode 100644 index 0000000000..371a25581d --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/481 diff --git a/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/db.go b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..1e00549714 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_create_table_like/postgresql/pgx/go/models.go b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..b23f089922 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type Change struct { + Ranked int32 +} + +type ChangesRanked struct { + Ranked int32 + RankByEffectSize int32 + RankByAbsPercentChange int32 +} diff --git a/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..2a19ba1d08 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/query.sql.go @@ -0,0 +1,34 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const allRanked = `-- name: AllRanked :many +SELECT ranked, rank_by_effect_size, rank_by_abs_percent_change FROM changes_ranked +` + +func (q *Queries) AllRanked(ctx context.Context) ([]ChangesRanked, error) { + rows, err := q.db.Query(ctx, allRanked) + if err != nil { + return nil, err + } + defer rows.Close() + var items []ChangesRanked + for rows.Next() { + var i ChangesRanked + if err := rows.Scan(&i.Ranked, &i.RankByEffectSize, &i.RankByAbsPercentChange); 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/ddl_create_table_like/postgresql/pgx/query.sql b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/query.sql new file mode 100644 index 0000000000..759ef862de --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/query.sql @@ -0,0 +1,2 @@ +-- name: AllRanked :many +SELECT * FROM changes_ranked; diff --git a/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/schema.sql b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..7365737bab --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE changes ( + ranked INT NOT NULL +); + +CREATE TABLE changes_ranked ( + LIKE changes INCLUDING ALL, + rank_by_effect_size INT NOT NULL, + rank_by_abs_percent_change INT NOT NULL +); diff --git a/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/ddl_create_table_like/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_partition/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/db.go index 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 af57ad9049..f2b61659d0 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e716c04705..2021aeb9b0 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 af57ad9049..f2b61659d0 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4d5a8833a4..93892e5783 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 4d5a8833a4..93892e5783 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 66de0116c9..4289389f52 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4d5a8833a4..93892e5783 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 44b2a9919f..c43b161fde 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest 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 index ee1b7ecd9e..abd3ab549c 100644 --- 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 @@ -1,3 +1,6 @@ { - "contexts": ["managed-db"] + "contexts": ["unknown"], + "meta": { + "invalid_schema": true + } } 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 ee08e36d03..8886ac424e 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 677c46f18a..b45d05b560 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 fef713f43d..f1fd7cc650 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 677c46f18a..b45d05b560 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b760c75a9b..b4ca845334 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_schema/mysql/exec.json b/internal/endtoend/testdata/ddl_drop_schema/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/ddl_drop_schema/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go +++ b/internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_drop_table/sqlite/schema.sql b/internal/endtoend/testdata/ddl_drop_table/sqlite/schema.sql index d2ea37a051..c0b8f00ed1 100644 --- a/internal/endtoend/testdata/ddl_drop_table/sqlite/schema.sql +++ b/internal/endtoend/testdata/ddl_drop_table/sqlite/schema.sql @@ -1,2 +1,8 @@ CREATE TABLE venues (hi text); -DROP TABLE venues; \ No newline at end of file +DROP TABLE venues; + +CREATE TABLE Authors (id integer); +DROP TABLE Authors; + +CREATE TABLE "Books" (id integer); +DROP TABLE "Books"; 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 7575cccd5c..90fc088b4d 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 b19102bd0f..7851cb18be 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7575cccd5c..90fc088b4d 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 dbfc410835..99dabef55e 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 2d49d84a49..8592a198af 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.23.0 +// sqlc v1.30.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 cfb20fca9e..d490737c00 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 dbfc410835..99dabef55e 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.23.0 +// sqlc v1.30.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 9e7bf53340..3f59aec9b9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/issue.md b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/issue.md new file mode 100644 index 0000000000..6b8f89e934 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/3371 \ No newline at end of file diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/exec.json b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/db.go b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/db.go new file mode 100644 index 0000000000..3895084dc3 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "context" + + "github.com/jackc/pgconn" + "github.com/jackc/pgx/v4" +) + +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_rename_drop_materialized_views/postgresql/pgx/v4/go/models.go b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/models.go new file mode 100644 index 0000000000..b2288a73cf --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/models.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} + +type AuthorsMv struct { + ID int64 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..6b935d3625 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/query.sql.go @@ -0,0 +1,22 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getAuthorMv = `-- name: GetAuthorMv :one +SELECT id, name, bio FROM authors_mv +WHERE id = $1 LIMIT 1 +` + +func (q *Queries) GetAuthorMv(ctx context.Context, id int64) (AuthorsMv, error) { + row := q.db.QueryRow(ctx, getAuthorMv, id) + var i AuthorsMv + err := row.Scan(&i.ID, &i.Name, &i.Bio) + return i, err +} diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/query.sql new file mode 100644 index 0000000000..752a6f4d47 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/query.sql @@ -0,0 +1,3 @@ +-- name: GetAuthorMv :one +SELECT * FROM authors_mv +WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/schema.sql new file mode 100644 index 0000000000..3f88871f93 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/schema.sql @@ -0,0 +1,18 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE MATERIALIZED VIEW authors_mv AS ( + SELECT * FROM authors +); + +CREATE MATERIALIZED VIEW authors_mv_new AS ( + SELECT * FROM authors +); + +ALTER MATERIALIZED VIEW authors_mv RENAME TO authors_mv_old; +ALTER MATERIALIZED VIEW authors_mv_new RENAME TO authors_mv; + +DROP MATERIALIZED VIEW authors_mv_old; diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/sqlc.yaml b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/sqlc.yaml new file mode 100644 index 0000000000..3440c3f119 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/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/v4" diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/exec.json b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/exec.json new file mode 100644 index 0000000000..ee1b7ecd9e --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/exec.json @@ -0,0 +1,3 @@ +{ + "contexts": ["managed-db"] +} diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/db.go b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/db.go new file mode 100644 index 0000000000..1e00549714 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_rename_drop_materialized_views/postgresql/pgx/v5/go/models.go b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/models.go new file mode 100644 index 0000000000..79b9c0ebc3 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/models.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} + +type AuthorsMv struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..6b935d3625 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,22 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getAuthorMv = `-- name: GetAuthorMv :one +SELECT id, name, bio FROM authors_mv +WHERE id = $1 LIMIT 1 +` + +func (q *Queries) GetAuthorMv(ctx context.Context, id int64) (AuthorsMv, error) { + row := q.db.QueryRow(ctx, getAuthorMv, id) + var i AuthorsMv + err := row.Scan(&i.ID, &i.Name, &i.Bio) + return i, err +} diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/query.sql new file mode 100644 index 0000000000..752a6f4d47 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/query.sql @@ -0,0 +1,3 @@ +-- name: GetAuthorMv :one +SELECT * FROM authors_mv +WHERE id = $1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/schema.sql new file mode 100644 index 0000000000..3f88871f93 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/schema.sql @@ -0,0 +1,18 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +CREATE MATERIALIZED VIEW authors_mv AS ( + SELECT * FROM authors +); + +CREATE MATERIALIZED VIEW authors_mv_new AS ( + SELECT * FROM authors +); + +ALTER MATERIALIZED VIEW authors_mv RENAME TO authors_mv_old; +ALTER MATERIALIZED VIEW authors_mv_new RENAME TO authors_mv; + +DROP MATERIALIZED VIEW authors_mv_old; diff --git a/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/sqlc.yaml b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/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/delete_from/mysql/go/db.go b/internal/endtoend/testdata/delete_from/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/delete_from/mysql/go/models.go +++ b/internal/endtoend/testdata/delete_from/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 092ed02e8e..1691acb0c2 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 553f0a8d95..2ee4810a1a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 553f0a8d95..2ee4810a1a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 9ed4ff1040..923b59d51a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/delete_from/sqlite/go/models.go +++ b/internal/endtoend/testdata/delete_from/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 092ed02e8e..1691acb0c2 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3bf6b9c7e9..d10385dde7 100644 --- a/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go +++ b/internal/endtoend/testdata/delete_inner_join/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Author struct { ID uint32 Name string 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 81fc9d7377..c61efcac1c 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 b1decfcc96..ebf0df7b7b 100644 --- a/internal/endtoend/testdata/delete_join/mysql/db/models.go +++ b/internal/endtoend/testdata/delete_join/mysql/db/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package db -import () - type JoinTable struct { ID uint64 PrimaryTableID uint64 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 54d659b87f..adab0de2cc 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.23.0 +// sqlc v1.30.0 // source: query.sql package db @@ -30,6 +30,17 @@ func (q *Queries) DeleteJoin(ctx context.Context, arg DeleteJoinParams) error { return err } +const deleteJoinWithSubquery = `-- name: DeleteJoinWithSubquery :exec +DELETE pt +FROM primary_table pt +JOIN (SELECT 1 as id) jt ON pt.id = jt.id +` + +func (q *Queries) DeleteJoinWithSubquery(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, deleteJoinWithSubquery) + return err +} + const deleteLeftJoin = `-- name: DeleteLeftJoin :exec DELETE jt.*, pt.* diff --git a/internal/endtoend/testdata/delete_join/mysql/query.sql b/internal/endtoend/testdata/delete_join/mysql/query.sql index d802ae12f1..d29062f90e 100644 --- a/internal/endtoend/testdata/delete_join/mysql/query.sql +++ b/internal/endtoend/testdata/delete_join/mysql/query.sql @@ -26,4 +26,9 @@ FROM RIGHT JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? - AND pt.user_id = ?; \ No newline at end of file + AND pt.user_id = ?; + +-- name: DeleteJoinWithSubquery :exec +DELETE pt +FROM primary_table pt +JOIN (SELECT 1 as id) jt ON pt.id = jt.id; 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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 de7136fb72..f2040e28d2 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.23.0 +// sqlc v1.30.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 9553cd477a..581c1d6fb3 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.23.0 +// sqlc v1.30.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 53319147cf..fc409f7e3f 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.23.0 +// sqlc v1.30.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 a573c6fc77..0e2e889bc6 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.23.0 +// sqlc v1.30.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 cf1530a68c..e54b0f59a1 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.23.0 +// sqlc v1.30.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 53319147cf..fc409f7e3f 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.23.0 +// sqlc v1.30.0 package authors diff --git a/internal/endtoend/testdata/diff_output/go/models.go b/internal/endtoend/testdata/diff_output/go/models.go index bf140dc75a..24e47df1ef 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.23.0 +// sqlc v1.30.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 5bc0e7190a..bb0bc6ce56 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.23.0 +// sqlc v1.30.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 7d918dffe7..9d485b5f16 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.23.0 +// sqlc v1.30.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 5098f4e665..d3515f1ede 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.23.0 +// sqlc v1.30.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 72cdd71210..31b1fefa59 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 d3e56d7d47..5041799d54 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.23.0 +// sqlc v1.30.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 5141a3218a..10fa883b3d 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/duplicate_go_names/enum/query.sql b/internal/endtoend/testdata/duplicate_go_names/enum/query.sql new file mode 100644 index 0000000000..760e82582e --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/enum/query.sql @@ -0,0 +1,2 @@ +-- name: GetFoos :many +SELECT * FROM foos; \ No newline at end of file diff --git a/internal/endtoend/testdata/duplicate_go_names/enum/schema.sql b/internal/endtoend/testdata/duplicate_go_names/enum/schema.sql new file mode 100644 index 0000000000..d0ac445ab1 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/enum/schema.sql @@ -0,0 +1,3 @@ +CREATE TYPE foo AS ENUM (); + +CREATE TABLE foos (); \ No newline at end of file diff --git a/internal/endtoend/testdata/duplicate_go_names/enum/sqlc.yaml b/internal/endtoend/testdata/duplicate_go_names/enum/sqlc.yaml new file mode 100644 index 0000000000..48946b0279 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/enum/sqlc.yaml @@ -0,0 +1,8 @@ +version: "2" +sql: +- schema: "schema.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + out: "db" diff --git a/internal/endtoend/testdata/duplicate_go_names/enum/stderr.txt b/internal/endtoend/testdata/duplicate_go_names/enum/stderr.txt new file mode 100644 index 0000000000..e6d206bda7 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/enum/stderr.txt @@ -0,0 +1,2 @@ +# package +error generating code: struct name conflicts with enum name: Foo diff --git a/internal/endtoend/testdata/duplicate_go_names/null_enum/query.sql b/internal/endtoend/testdata/duplicate_go_names/null_enum/query.sql new file mode 100644 index 0000000000..fcb2e75923 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/null_enum/query.sql @@ -0,0 +1,2 @@ +-- name: GetFoos :many +SELECT * FROM null_foos; \ No newline at end of file diff --git a/internal/endtoend/testdata/duplicate_go_names/null_enum/schema.sql b/internal/endtoend/testdata/duplicate_go_names/null_enum/schema.sql new file mode 100644 index 0000000000..46fe734fe0 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/null_enum/schema.sql @@ -0,0 +1,3 @@ +CREATE TYPE foo AS ENUM (); + +CREATE TABLE null_foos (); \ No newline at end of file diff --git a/internal/endtoend/testdata/duplicate_go_names/null_enum/sqlc.yaml b/internal/endtoend/testdata/duplicate_go_names/null_enum/sqlc.yaml new file mode 100644 index 0000000000..48946b0279 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/null_enum/sqlc.yaml @@ -0,0 +1,8 @@ +version: "2" +sql: +- schema: "schema.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + out: "db" diff --git a/internal/endtoend/testdata/duplicate_go_names/null_enum/stderr.txt b/internal/endtoend/testdata/duplicate_go_names/null_enum/stderr.txt new file mode 100644 index 0000000000..16321a008f --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/null_enum/stderr.txt @@ -0,0 +1,2 @@ +# package +error generating code: struct name conflicts with enum name: NullFoo diff --git a/internal/endtoend/testdata/duplicate_go_names/query_constant/query.sql b/internal/endtoend/testdata/duplicate_go_names/query_constant/query.sql new file mode 100644 index 0000000000..fc3436d4c5 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/query_constant/query.sql @@ -0,0 +1,2 @@ +-- name: Foo :one +SELECT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/duplicate_go_names/query_constant/schema.sql b/internal/endtoend/testdata/duplicate_go_names/query_constant/schema.sql new file mode 100644 index 0000000000..a0ed9c3aba --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/query_constant/schema.sql @@ -0,0 +1 @@ +CREATE TYPE foo AS ENUM (); diff --git a/internal/endtoend/testdata/duplicate_go_names/query_constant/sqlc.yaml b/internal/endtoend/testdata/duplicate_go_names/query_constant/sqlc.yaml new file mode 100644 index 0000000000..e6314287c2 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/query_constant/sqlc.yaml @@ -0,0 +1,9 @@ +version: "2" +sql: +- schema: "schema.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + out: "db" + emit_exported_queries: true diff --git a/internal/endtoend/testdata/duplicate_go_names/query_constant/stderr.txt b/internal/endtoend/testdata/duplicate_go_names/query_constant/stderr.txt new file mode 100644 index 0000000000..1a9b5f80b5 --- /dev/null +++ b/internal/endtoend/testdata/duplicate_go_names/query_constant/stderr.txt @@ -0,0 +1,2 @@ +# package +error generating code: query constant name conflicts with enum name: Foo 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 934d6e68f5..7a8d049ca3 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.23.0 +// sqlc v1.30.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 d12cbc722d..5018df0e2a 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 934d6e68f5..7a8d049ca3 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.23.0 +// sqlc v1.30.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 2e7b8dca16..ac9cb5cc66 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f392a6956b..3e61e3751a 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.23.0 +// sqlc v1.30.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 2e7b8dca16..ac9cb5cc66 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 934d6e68f5..7a8d049ca3 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.23.0 +// sqlc v1.30.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 d12cbc722d..5018df0e2a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 82533ad15b..6adfc71ef9 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.23.0 +// sqlc v1.30.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 d12cbc722d..5018df0e2a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0ef644f039..7b7052a133 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.23.0 +// sqlc v1.30.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 d12cbc722d..5018df0e2a 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 0ef644f039..7b7052a133 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.23.0 +// sqlc v1.30.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 2e7b8dca16..ac9cb5cc66 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 5958618a43..7abf837c7d 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.23.0 +// sqlc v1.30.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 2e7b8dca16..ac9cb5cc66 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0ef644f039..7b7052a133 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.23.0 +// sqlc v1.30.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 d12cbc722d..5018df0e2a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d66b94bca6..7dabd95332 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.23.0 +// sqlc v1.30.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 d12cbc722d..5018df0e2a 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 8b27663fea..df99bb1722 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 8b27663fea..df99bb1722 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 db00f4bb04..24ca1da9c1 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 1a37dfb168..9a5c991421 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.23.0 +// sqlc v1.30.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 e3bb83ff68..30a1622132 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 0230392259..934bf69c13 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 0230392259..934bf69c13 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go +++ b/internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 e1c4c315cb..4325490a42 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.23.0 +// sqlc v1.30.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 f2cb24431f..44139faf54 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.23.0 +// sqlc v1.30.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 fd6df7f234..f5668bd976 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.23.0 +// sqlc v1.30.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 9714a82807..a710fa5c85 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.23.0 +// sqlc v1.30.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 0c24084df1..7599fccb42 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.23.0 +// sqlc v1.30.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 fd6df7f234..f5668bd976 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.23.0 +// sqlc v1.30.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 4e13cf0b34..611c1e5874 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.23.0 +// sqlc v1.30.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 eecc083931..166695c170 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.23.0 +// sqlc v1.30.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 f7140f29a2..f68e9f60b9 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.23.0 +// sqlc v1.30.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 4e13cf0b34..611c1e5874 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.23.0 +// sqlc v1.30.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 f2cb24431f..44139faf54 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.23.0 +// sqlc v1.30.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 fd6df7f234..f5668bd976 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.23.0 +// sqlc v1.30.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 9714a82807..a710fa5c85 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.23.0 +// sqlc v1.30.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 f2cb24431f..44139faf54 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.23.0 +// sqlc v1.30.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 933482678c..dfbb4f7e0b 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.23.0 +// sqlc v1.30.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 9714a82807..a710fa5c85 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.23.0 +// sqlc v1.30.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 7fd32d6893..4e47262b7d 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.23.0 +// sqlc v1.30.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 9184aa0925..70b1ef30f7 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..3a1b6bccec --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/query.sql b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/query.sql +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; 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 7d61537ef5..2853d5f77e 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.23.0 +// sqlc v1.30.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 60bd23ae09..deab99cd28 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..3a1b6bccec --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/query.sql b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/query.sql +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/db.go b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/db.go new file mode 100644 index 0000000000..0a639a6476 --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package datatype + +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/emit_pointers_for_null_types/sqlite/go/models.go b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/models.go new file mode 100644 index 0000000000..2d52f36770 --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/models.go @@ -0,0 +1,27 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package datatype + +import ( + "time" +) + +type DtType struct { + A *int64 + B *float64 + C *bool + D *time.Time + E *string + F *float64 +} + +type DtTypesNotNull struct { + A int64 + B float64 + C bool + D time.Time + E string + F float64 +} diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/query.sql.go b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/query.sql.go new file mode 100644 index 0000000000..fa36be67e6 --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const noop = `-- name: Noop :one +SELECT 1 +` + +func (q *Queries) Noop(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, noop) + var column_1 int64 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/query.sql b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/query.sql new file mode 100644 index 0000000000..d32220c3d5 --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/query.sql @@ -0,0 +1,2 @@ +-- name: Noop :one +SELECT 1; diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/types.sql b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/types.sql new file mode 100644 index 0000000000..eb55c80eda --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/types.sql @@ -0,0 +1,18 @@ + +CREATE TABLE dt_types ( + a int, + b real, + c bool, + d date, + e text, + f numeric +); + +CREATE TABLE dt_types_not_null ( + a int NOT NULL, + b real NOT NULL, + c bool NOT NULL, + d date NOT NULL, + e text NOT NULL, + f numeric NOT NULL +); diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sqlc.json b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sqlc.json new file mode 100644 index 0000000000..9b8d7693bc --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sqlc.json @@ -0,0 +1,13 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "sqlite", + "name": "datatype", + "schema": "sql/types.sql", + "queries": "sql/query.sql", + "emit_pointers_for_null_types": true + } + ] +} 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 dcbffc39cb..0a639a6476 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.23.0 +// sqlc v1.30.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 67c9bc0399..691793cbdd 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.23.0 +// sqlc v1.30.0 package datatype diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/query.sql.go new file mode 100644 index 0000000000..4720927d0a --- /dev/null +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package datatype + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/query.sql b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/query.sql +++ b/internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py b/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py deleted file mode 100644 index 7ac0da3afe..0000000000 --- a/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import pydantic -from typing import Optional - - -class Author(pydantic.BaseModel): - id: int - name: str - bio: Optional[str] diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py b/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py deleted file mode 100644 index be41e04650..0000000000 --- a/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py +++ /dev/null @@ -1,112 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -from typing import AsyncIterator, Iterator, Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from postgresql import models - - -CREATE_AUTHOR = """-- name: create_author \\:one -INSERT INTO authors ( - name, bio -) VALUES ( - :p1, :p2 -) -RETURNING id, name, bio -""" - - -DELETE_AUTHOR = """-- name: delete_author \\:exec -DELETE FROM authors -WHERE id = :p1 -""" - - -GET_AUTHOR = """-- name: get_author \\:one -SELECT id, name, bio FROM authors -WHERE id = :p1 LIMIT 1 -""" - - -LIST_AUTHORS = """-- name: list_authors \\:many -SELECT id, name, bio FROM authors -ORDER BY name -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def create_author(self, *, name: str, bio: Optional[str]) -> Optional[models.Author]: - row = self._conn.execute(sqlalchemy.text(CREATE_AUTHOR), {"p1": name, "p2": bio}).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - def delete_author(self, *, id: int) -> None: - self._conn.execute(sqlalchemy.text(DELETE_AUTHOR), {"p1": id}) - - def get_author(self, *, id: int) -> Optional[models.Author]: - row = self._conn.execute(sqlalchemy.text(GET_AUTHOR), {"p1": id}).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - def list_authors(self) -> Iterator[models.Author]: - result = self._conn.execute(sqlalchemy.text(LIST_AUTHORS)) - for row in result: - yield models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def create_author(self, *, name: str, bio: Optional[str]) -> Optional[models.Author]: - row = (await self._conn.execute(sqlalchemy.text(CREATE_AUTHOR), {"p1": name, "p2": bio})).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - async def delete_author(self, *, id: int) -> None: - await self._conn.execute(sqlalchemy.text(DELETE_AUTHOR), {"p1": id}) - - async def get_author(self, *, id: int) -> Optional[models.Author]: - row = (await self._conn.execute(sqlalchemy.text(GET_AUTHOR), {"p1": id})).first() - if row is None: - return None - return models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) - - async def list_authors(self) -> AsyncIterator[models.Author]: - result = await self._conn.stream(sqlalchemy.text(LIST_AUTHORS)) - async for row in result: - yield models.Author( - id=row[0], - name=row[1], - bio=row[2], - ) diff --git a/internal/endtoend/testdata/emit_pydantic_models/sqlc.json b/internal/endtoend/testdata/emit_pydantic_models/sqlc.json deleted file mode 100644 index 65ca70df70..0000000000 --- a/internal/endtoend/testdata/emit_pydantic_models/sqlc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "postgresql/schema.sql", - "queries": "postgresql/query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "postgresql", - "options": { - "package": "postgresql", - "emit_sync_querier": true, - "emit_async_querier": true, - "emit_pydantic_models": true - } - } - ] - } - ] -} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 814e816000..530968fc6b 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.23.0 +// sqlc v1.30.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 5d47378b94..928b9423af 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.23.0 +// sqlc v1.30.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 5bfa28bdf5..6314b95930 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.23.0 +// sqlc v1.30.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 8cff61e7cd..ec7726ffae 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.23.0 +// sqlc v1.30.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 e9e8215a7f..fa88475d3d 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.23.0 +// sqlc v1.30.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 814e816000..530968fc6b 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.23.0 +// sqlc v1.30.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 648b485d7c..cbec4e96ee 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.23.0 +// sqlc v1.30.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 804c648f7e..13d3eb8db6 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.23.0 +// sqlc v1.30.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 111654b366..9a44027379 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.23.0 +// sqlc v1.30.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 a1eb2a422f..95e7754cd6 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.23.0 +// sqlc v1.30.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 a7f210cdbb..d6a2282c78 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/exec.json b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/exec.json new file mode 100644 index 0000000000..9f208fb2df --- /dev/null +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/exec.json @@ -0,0 +1,3 @@ +{ + "os": ["darwin", "linux"] +} diff --git a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/db.go b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/emit_sql_as_comment/stdlib/go/models.go b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go new file mode 100644 index 0000000000..4f106ee2e3 --- /dev/null +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go @@ -0,0 +1,9 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type Bar struct { + ID int32 +} diff --git a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/query.sql.go b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/query.sql.go new file mode 100644 index 0000000000..3438f222fe --- /dev/null +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/query.sql.go @@ -0,0 +1,56 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const listBar = `-- name: ListBar :many +SELECT id FROM ( + SELECT id FROM bar +) bar +` + +// Lists all bars +// +// SELECT id FROM ( +// SELECT id FROM bar +// ) bar +func (q *Queries) ListBar(ctx context.Context) ([]int32, error) { + rows, err := q.db.QueryContext(ctx, listBar) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int32 + for rows.Next() { + var id int32 + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const removeBar = `-- name: RemoveBar :exec +DELETE FROM bar WHERE id = $1 +` + +// RemoveBar +// +// DELETE FROM bar WHERE id = $1 +func (q *Queries) RemoveBar(ctx context.Context, id int32) error { + _, err := q.db.ExecContext(ctx, removeBar, id) + return err +} diff --git a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/query.sql b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/query.sql new file mode 100644 index 0000000000..e3551898fb --- /dev/null +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/query.sql @@ -0,0 +1,8 @@ +-- name: ListBar :many +-- Lists all bars +SELECT id FROM ( + SELECT * FROM bar +) bar; + +-- name: RemoveBar :exec +DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/schema.sql b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/schema.sql similarity index 97% rename from internal/endtoend/testdata/exec_result/python_postgresql/schema.sql rename to internal/endtoend/testdata/emit_sql_as_comment/stdlib/schema.sql index 638370ab15..682614c578 100644 --- a/internal/endtoend/testdata/exec_result/python_postgresql/schema.sql +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/schema.sql @@ -1,2 +1 @@ CREATE TABLE bar (id serial not null); - diff --git a/internal/endtoend/testdata/emit_sql_as_comment/stdlib/sqlc.json b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/sqlc.json new file mode 100644 index 0000000000..9464b72b2e --- /dev/null +++ b/internal/endtoend/testdata/emit_sql_as_comment/stdlib/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql", + "emit_sql_as_comment": true + } + ] +} diff --git a/internal/endtoend/testdata/enum/mysql/go/db.go b/internal/endtoend/testdata/enum/mysql/go/db.go index f2cb24431f..44139faf54 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/enum/mysql/go/models.go b/internal/endtoend/testdata/enum/mysql/go/models.go index bfd7ccf91c..0ed9bc8b73 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.23.0 +// sqlc v1.30.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 3dd60ad681..4c95030785 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.23.0 +// sqlc v1.30.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 0c24084df1..7599fccb42 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.23.0 +// sqlc v1.30.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 6fe18d3763..152ecabadd 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.23.0 +// sqlc v1.30.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 b5006bfd3a..66a8db871b 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.23.0 +// sqlc v1.30.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 eecc083931..166695c170 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.23.0 +// sqlc v1.30.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 0a716ddf07..22c9bb0555 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.23.0 +// sqlc v1.30.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 a1c57fcc73..81bde82c79 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.23.0 +// sqlc v1.30.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 f2cb24431f..44139faf54 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.23.0 +// sqlc v1.30.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 6fe18d3763..152ecabadd 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.23.0 +// sqlc v1.30.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 4f17da9aac..08e77ed7b7 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 796f3e7b99..2c8383b687 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.23.0 +// sqlc v1.30.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 9a14cfe2c7..3fc35608e0 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 d104ba0df7..09436fd2e7 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.23.0 +// sqlc v1.30.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 6796d82079..4df64b6fb2 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.23.0 +// sqlc v1.30.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 da3d489aa8..61d2425c01 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/exec_create_table/mysql/db/db.go b/internal/endtoend/testdata/exec_create_table/mysql/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/mysql/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/exec_create_table/mysql/db/models.go b/internal/endtoend/testdata/exec_create_table/mysql/db/models.go new file mode 100644 index 0000000000..32099017df --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/mysql/db/models.go @@ -0,0 +1,5 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db diff --git a/internal/endtoend/testdata/exec_create_table/mysql/db/mysql.query.sql.go b/internal/endtoend/testdata/exec_create_table/mysql/db/mysql.query.sql.go new file mode 100644 index 0000000000..11947091b9 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/mysql/db/mysql.query.sql.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: mysql.query.sql + +package db + +import ( + "context" +) + +const createTable = `-- name: CreateTable :exec +CREATE TABLE test (id INTEGER NOT NULL) +` + +func (q *Queries) CreateTable(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, createTable) + return err +} diff --git a/internal/endtoend/testdata/exec_create_table/mysql/mysql.query.sql b/internal/endtoend/testdata/exec_create_table/mysql/mysql.query.sql new file mode 100644 index 0000000000..0a92ebb9cb --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/mysql/mysql.query.sql @@ -0,0 +1,2 @@ +-- name: CreateTable :exec +CREATE TABLE test (id INTEGER NOT NULL); diff --git a/examples/python/src/authors/__init__.py b/internal/endtoend/testdata/exec_create_table/mysql/mysql.schema.sql similarity index 100% rename from examples/python/src/authors/__init__.py rename to internal/endtoend/testdata/exec_create_table/mysql/mysql.schema.sql diff --git a/internal/endtoend/testdata/exec_create_table/mysql/sqlc.yaml b/internal/endtoend/testdata/exec_create_table/mysql/sqlc.yaml new file mode 100644 index 0000000000..bd888aabfc --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/mysql/sqlc.yaml @@ -0,0 +1,8 @@ +version: 2 +sql: +- queries: mysql.query.sql + schema: mysql.schema.sql + engine: mysql + gen: + go: + out: db diff --git a/internal/endtoend/testdata/exec_create_table/postgresql/db/db.go b/internal/endtoend/testdata/exec_create_table/postgresql/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/postgresql/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/exec_create_table/postgresql/db/models.go b/internal/endtoend/testdata/exec_create_table/postgresql/db/models.go new file mode 100644 index 0000000000..32099017df --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/postgresql/db/models.go @@ -0,0 +1,5 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db diff --git a/internal/endtoend/testdata/exec_create_table/postgresql/db/postgresql.query.sql.go b/internal/endtoend/testdata/exec_create_table/postgresql/db/postgresql.query.sql.go new file mode 100644 index 0000000000..3ecce84aa4 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/postgresql/db/postgresql.query.sql.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: postgresql.query.sql + +package db + +import ( + "context" +) + +const createTable = `-- name: CreateTable :exec +CREATE TABLE test (id INTEGER NOT NULL) +` + +func (q *Queries) CreateTable(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, createTable) + return err +} diff --git a/internal/endtoend/testdata/exec_create_table/postgresql/postgresql.query.sql b/internal/endtoend/testdata/exec_create_table/postgresql/postgresql.query.sql new file mode 100644 index 0000000000..0a92ebb9cb --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/postgresql/postgresql.query.sql @@ -0,0 +1,2 @@ +-- name: CreateTable :exec +CREATE TABLE test (id INTEGER NOT NULL); diff --git a/examples/python/src/booktest/__init__.py b/internal/endtoend/testdata/exec_create_table/postgresql/postgresql.schema.sql similarity index 100% rename from examples/python/src/booktest/__init__.py rename to internal/endtoend/testdata/exec_create_table/postgresql/postgresql.schema.sql diff --git a/internal/endtoend/testdata/exec_create_table/postgresql/sqlc.yaml b/internal/endtoend/testdata/exec_create_table/postgresql/sqlc.yaml new file mode 100644 index 0000000000..6a89eb2179 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/postgresql/sqlc.yaml @@ -0,0 +1,9 @@ +version: 2 +sql: +- queries: postgresql.query.sql + schema: postgresql.schema.sql + engine: postgresql + gen: + go: + out: db + diff --git a/internal/endtoend/testdata/exec_create_table/sqlite/db/db.go b/internal/endtoend/testdata/exec_create_table/sqlite/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/sqlite/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/exec_create_table/sqlite/db/models.go b/internal/endtoend/testdata/exec_create_table/sqlite/db/models.go new file mode 100644 index 0000000000..32099017df --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/sqlite/db/models.go @@ -0,0 +1,5 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db diff --git a/internal/endtoend/testdata/exec_create_table/sqlite/db/sqlite.query.sql.go b/internal/endtoend/testdata/exec_create_table/sqlite/db/sqlite.query.sql.go new file mode 100644 index 0000000000..17ffec74e7 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/sqlite/db/sqlite.query.sql.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: sqlite.query.sql + +package db + +import ( + "context" +) + +const createTable = `-- name: CreateTable :exec +CREATE TABLE test (id INTEGER NOT NULL) +` + +func (q *Queries) CreateTable(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, createTable) + return err +} diff --git a/internal/endtoend/testdata/exec_create_table/sqlite/sqlc.yaml b/internal/endtoend/testdata/exec_create_table/sqlite/sqlc.yaml new file mode 100644 index 0000000000..bf2e6024b6 --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/sqlite/sqlc.yaml @@ -0,0 +1,8 @@ +version: 2 +sql: +- queries: sqlite.query.sql + schema: sqlite.schema.sql + engine: sqlite + gen: + go: + out: db diff --git a/internal/endtoend/testdata/exec_create_table/sqlite/sqlite.query.sql b/internal/endtoend/testdata/exec_create_table/sqlite/sqlite.query.sql new file mode 100644 index 0000000000..0a92ebb9cb --- /dev/null +++ b/internal/endtoend/testdata/exec_create_table/sqlite/sqlite.query.sql @@ -0,0 +1,2 @@ +-- name: CreateTable :exec +CREATE TABLE test (id INTEGER NOT NULL); diff --git a/examples/python/src/dbtest/__init__.py b/internal/endtoend/testdata/exec_create_table/sqlite/sqlite.schema.sql similarity index 100% rename from examples/python/src/dbtest/__init__.py rename to internal/endtoend/testdata/exec_create_table/sqlite/sqlite.schema.sql 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 0eb01a6e5b..aa72c20020 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.23.0 +// sqlc v1.30.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 562984fdf7..4ac6134bc7 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.23.0 +// sqlc v1.30.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 bfdb680fe5..9b47f5f368 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f6558c71e2..5dde21524b 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.23.0 +// sqlc v1.30.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 562984fdf7..4ac6134bc7 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.23.0 +// sqlc v1.30.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 bfdb680fe5..9b47f5f368 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0eb01a6e5b..aa72c20020 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.23.0 +// sqlc v1.30.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 562984fdf7..4ac6134bc7 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.23.0 +// sqlc v1.30.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 266da1faec..56f78eddb9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 30759df3ab..c231878b80 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.23.0 +// sqlc v1.30.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 b5c086d957..ca4d7990ab 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/exec_no_return_struct/issue.md b/internal/endtoend/testdata/exec_no_return_struct/issue.md new file mode 100644 index 0000000000..1184d6e9e3 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2970 diff --git a/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/db.go b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..1e00549714 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/exec_no_return_struct/postgresql/pgx/go/models.go b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..967badc4a9 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Job struct { + TaskName string + LastRun pgtype.Timestamptz +} diff --git a/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..fda09ec9c5 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/query.sql.go @@ -0,0 +1,30 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const resetTaskRun = `-- name: ResetTaskRun :exec +UPDATE job +SET last_run = NOW() +FROM ( + SELECT last_run, + task_name + FROM job AS o + WHERE o.task_name = $1 + FOR UPDATE + ) AS old_values +WHERE job.task_name = $1 +RETURNING job.last_run AS this_run, + old_values.last_run AS last_run +` + +func (q *Queries) ResetTaskRun(ctx context.Context, taskName string) error { + _, err := q.db.Exec(ctx, resetTaskRun, taskName) + return err +} diff --git a/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/query.sql b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/query.sql new file mode 100644 index 0000000000..968ce9f7c8 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/query.sql @@ -0,0 +1,13 @@ +-- name: ResetTaskRun :exec +UPDATE job +SET last_run = NOW() +FROM ( + SELECT last_run, + task_name + FROM job AS o + WHERE o.task_name = $1 + FOR UPDATE + ) AS old_values +WHERE job.task_name = $1 +RETURNING job.last_run AS this_run, + old_values.last_run AS last_run; diff --git a/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/schema.sql b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..6dd162bed9 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS job +( + task_name text NOT NULL, + last_run timestamp with time zone DEFAULT now() NOT NULL +); diff --git a/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/exec_no_return_struct/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/exec_result/go_postgresql_pgx/v4/go/db.go b/internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go index 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 64497343f4..6c8ba2785f 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.23.0 +// sqlc v1.30.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 534f5fee1e..21bf5b2a97 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 e04407eb94..835fc35107 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.23.0 +// sqlc v1.30.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 7a4b9bda87..4d9b85fd50 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 dae83edc79..e5fe52ff35 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.23.0 +// sqlc v1.30.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 03dd7b42fa..166b0fa972 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.23.0 +// sqlc v1.30.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 deleted file mode 100644 index d2293ed70c..0000000000 --- a/internal/endtoend/testdata/exec_result/python_postgresql/python/models.py +++ /dev/null @@ -1,9 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Bar: - id: int diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py b/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py deleted file mode 100644 index ceccd51027..0000000000 --- a/internal/endtoend/testdata/exec_result/python_postgresql/python/query.py +++ /dev/null @@ -1,29 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -import sqlalchemy -import sqlalchemy.ext.asyncio - -from querytest import models - - -DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:execresult -DELETE FROM bar WHERE id = :p1 -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def delete_bar_by_id(self, *, id: int) -> sqlalchemy.engine.Result: - return self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def delete_bar_by_id(self, *, id: int) -> sqlalchemy.engine.Result: - return await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/query.sql b/internal/endtoend/testdata/exec_result/python_postgresql/query.sql deleted file mode 100644 index 73917782cb..0000000000 --- a/internal/endtoend/testdata/exec_result/python_postgresql/query.sql +++ /dev/null @@ -1,2 +0,0 @@ --- name: DeleteBarByID :execresult -DELETE FROM bar WHERE id = $1; diff --git a/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json b/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json deleted file mode 100644 index 5eae79b795..0000000000 --- a/internal/endtoend/testdata/exec_result/python_postgresql/sqlc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true - } - } - ] - } - ] -} 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 98475c75a3..1b50d38666 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.23.0 +// sqlc v1.30.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 e30d00015f..5b5976e237 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 98475c75a3..1b50d38666 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.23.0 +// sqlc v1.30.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 e30d00015f..5b5976e237 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 98475c75a3..1b50d38666 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.23.0 +// sqlc v1.30.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 b87ecf35b4..57dd159fd5 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.23.0 +// sqlc v1.30.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 deleted file mode 100644 index d2293ed70c..0000000000 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/python/models.py +++ /dev/null @@ -1,9 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Bar: - id: int diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py b/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py deleted file mode 100644 index 904f42836c..0000000000 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/python/query.py +++ /dev/null @@ -1,31 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -import sqlalchemy -import sqlalchemy.ext.asyncio - -from querytest import models - - -DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:execrows -DELETE FROM bar WHERE id = :p1 -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def delete_bar_by_id(self, *, id: int) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - return result.rowcount - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def delete_bar_by_id(self, *, id: int) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - return result.rowcount diff --git a/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql b/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql deleted file mode 100644 index 94d2d09f90..0000000000 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/query.sql +++ /dev/null @@ -1,2 +0,0 @@ --- 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 deleted file mode 100644 index 638370ab15..0000000000 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/schema.sql +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 5eae79b795..0000000000 --- a/internal/endtoend/testdata/exec_rows/python_postgresql/sqlc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true - } - } - ] - } - ] -} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3e4762b0b5..f1e4064907 100644 --- a/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go +++ b/internal/endtoend/testdata/full_outer_join/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Author struct { ID int64 Name string 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 25e20baa54..2e4903124d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 bf2757e632..eaf05e5c00 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.23.0 +// sqlc v1.30.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 65ca850dd6..0d04b2855c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 bf2757e632..eaf05e5c00 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.23.0 +// sqlc v1.30.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 50f77739a5..b57889b4a3 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/func_args/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/func_args/pgx/v4/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 63bc37c495..74bd180307 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/func_args/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/func_args/pgx/v5/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 970809d4dc..55d849fca7 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/func_args/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_args/stdlib/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 8369f5e347..e083ece3f3 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 47046aaff1..9e091cf0f0 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 47046aaff1..9e091cf0f0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go +++ b/internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 ace70d9fd8..8d37ee409c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/func_call_cast/mysql/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/mysql/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 c8a48fa4b6..4199d37599 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 93f7b8fb8f..3c4ae5070b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 dac9bf3be5..fb325cd9bc 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 d96ce1968d..26f8697252 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go +++ b/internal/endtoend/testdata/func_call_cast/sqlite/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 9b1fd993d8..797db651d3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4b42110d88..eb64577fc3 100644 --- a/internal/endtoend/testdata/func_match_types/mysql/go/models.go +++ b/internal/endtoend/testdata/func_match_types/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Book struct { ID int32 Title string 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 50e8aedb31..4843b2807e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4b42110d88..eb64577fc3 100644 --- a/internal/endtoend/testdata/func_match_types/postgresql/go/models.go +++ b/internal/endtoend/testdata/func_match_types/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Book struct { ID int32 Title string 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 a2b0409a4e..1a4f16f188 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 07f1cdd69d..84258229b2 100644 --- a/internal/endtoend/testdata/func_match_types/sqlite/go/models.go +++ b/internal/endtoend/testdata/func_match_types/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Book struct { ID int64 Title string 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 0f23995019..60b373aeb9 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 42bf218044..e4cf9d17ae 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.23.0 +// sqlc v1.30.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 bf8e8cea9c..03b53863f4 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 7f4ad5658a..c11ac157c0 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 25f5f5fc8e..0a05becd82 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 477ad4847f..697afe2378 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 bae6ec332c..f323010acf 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index e6c31e8874..4aacc462ac 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 851df4e87a..a976e628cf 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 851df4e87a..a976e628cf 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index aacbe4f6eb..ab90ac0a03 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 fb633669fb..c99cf3d8af 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Account struct { ID int32 Username 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 index 7b34360e60..2d9be96f4b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 19fd0b8ba2..85bf9ee12f 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 5840bcbeb5..03818a02f4 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 35936a471f..8eca49cebe 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c8908d73c0..62625b2dd2 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.23.0 +// sqlc v1.30.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 7b5b995fcc..a4938a4241 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 c1e04e3f05..1e9ad482a6 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.23.0 +// sqlc v1.30.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 ab0a3f7c8c..164284d0a1 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 5d11316bfe..82d4b4dfa9 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.23.0 +// sqlc v1.30.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 ab0a3f7c8c..164284d0a1 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/golang_initialisms_empty/db/db.go b/internal/endtoend/testdata/golang_initialisms_empty/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_empty/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/golang_initialisms_empty/db/models.go b/internal/endtoend/testdata/golang_initialisms_empty/db/models.go new file mode 100644 index 0000000000..bf7f3fdc5b --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_empty/db/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Foo struct { + BarId sql.NullString +} diff --git a/internal/endtoend/testdata/golang_initialisms_empty/db/query.sql.go b/internal/endtoend/testdata/golang_initialisms_empty/db/query.sql.go new file mode 100644 index 0000000000..426a750297 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_empty/db/query.sql.go @@ -0,0 +1,38 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" + "database/sql" +) + +const selectFoo = `-- name: SelectFoo :many +SELECT bar_id FROM foo +` + +func (q *Queries) SelectFoo(ctx context.Context) ([]sql.NullString, error) { + rows, err := q.db.QueryContext(ctx, selectFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []sql.NullString + for rows.Next() { + var bar_id sql.NullString + if err := rows.Scan(&bar_id); err != nil { + return nil, err + } + items = append(items, bar_id) + } + 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/golang_initialisms_empty/query.sql b/internal/endtoend/testdata/golang_initialisms_empty/query.sql new file mode 100644 index 0000000000..e32e926b32 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_empty/query.sql @@ -0,0 +1,2 @@ +-- name: SelectFoo :many +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/golang_initialisms_empty/schema.sql b/internal/endtoend/testdata/golang_initialisms_empty/schema.sql new file mode 100644 index 0000000000..fe692b6af6 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_empty/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo( + bar_id text +); diff --git a/internal/endtoend/testdata/golang_initialisms_empty/sqlc.json b/internal/endtoend/testdata/golang_initialisms_empty/sqlc.json new file mode 100644 index 0000000000..02ab2e395c --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_empty/sqlc.json @@ -0,0 +1,16 @@ +{ + "version": "2", + "sql": [ + { + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "gen": { + "go": { + "out": "db", + "initialisms": [] + } + } + } + ] +} diff --git a/internal/endtoend/testdata/golang_initialisms_url/db/db.go b/internal/endtoend/testdata/golang_initialisms_url/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_url/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/golang_initialisms_url/db/models.go b/internal/endtoend/testdata/golang_initialisms_url/db/models.go new file mode 100644 index 0000000000..3062c6ad8e --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_url/db/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Foo struct { + BarID sql.NullString + SiteURL sql.NullString +} diff --git a/internal/endtoend/testdata/golang_initialisms_url/db/query.sql.go b/internal/endtoend/testdata/golang_initialisms_url/db/query.sql.go new file mode 100644 index 0000000000..a7c5349dab --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_url/db/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" +) + +const selectFoo = `-- name: SelectFoo :many +SELECT bar_id, site_url FROM foo +` + +func (q *Queries) SelectFoo(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, selectFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.BarID, &i.SiteURL); 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/golang_initialisms_url/query.sql b/internal/endtoend/testdata/golang_initialisms_url/query.sql new file mode 100644 index 0000000000..e32e926b32 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_url/query.sql @@ -0,0 +1,2 @@ +-- name: SelectFoo :many +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/golang_initialisms_url/schema.sql b/internal/endtoend/testdata/golang_initialisms_url/schema.sql new file mode 100644 index 0000000000..d0b2506904 --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_url/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo ( + bar_id text, + site_url text +); diff --git a/internal/endtoend/testdata/golang_initialisms_url/sqlc.json b/internal/endtoend/testdata/golang_initialisms_url/sqlc.json new file mode 100644 index 0000000000..2b135eec3e --- /dev/null +++ b/internal/endtoend/testdata/golang_initialisms_url/sqlc.json @@ -0,0 +1,16 @@ +{ + "version": "2", + "sql": [ + { + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "gen": { + "go": { + "out": "db", + "initialisms": ["id", "url"] + } + } + } + ] +} diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go b/internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/golang_invalid_sql_driver/db/models.go b/internal/endtoend/testdata/golang_invalid_sql_driver/db/models.go new file mode 100644 index 0000000000..69bf4b51b6 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/db/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Foo struct { + Bar sql.NullString +} diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go b/internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go new file mode 100644 index 0000000000..a5c350affa --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go @@ -0,0 +1,38 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" + "database/sql" +) + +const selectFoo = `-- name: SelectFoo :many +SELECT bar FROM foo +` + +func (q *Queries) SelectFoo(ctx context.Context) ([]sql.NullString, error) { + rows, err := q.db.QueryContext(ctx, selectFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []sql.NullString + for rows.Next() { + var bar sql.NullString + if err := rows.Scan(&bar); err != nil { + return nil, err + } + items = append(items, bar) + } + 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/golang_invalid_sql_driver/query.sql b/internal/endtoend/testdata/golang_invalid_sql_driver/query.sql new file mode 100644 index 0000000000..e32e926b32 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/query.sql @@ -0,0 +1,2 @@ +-- name: SelectFoo :many +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql b/internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql new file mode 100644 index 0000000000..1bd72529f8 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo( + bar text +); diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json b/internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json new file mode 100644 index 0000000000..6124f178d1 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json @@ -0,0 +1,16 @@ +{ + "version": "2", + "sql": [ + { + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "gen": { + "go": { + "out": "db", + "sql_driver": "github.com/unknown/driver" + } + } + } + ] +} diff --git a/internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt b/internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt new file mode 100644 index 0000000000..b71f130a2f --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt @@ -0,0 +1,2 @@ +# package +error generating code: invalid options: unknown SQL driver: github.com/unknown/driver diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/db/db.go b/internal/endtoend/testdata/golang_invalid_sql_package/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/golang_invalid_sql_package/db/models.go b/internal/endtoend/testdata/golang_invalid_sql_package/db/models.go new file mode 100644 index 0000000000..69bf4b51b6 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/db/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Foo struct { + Bar sql.NullString +} diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go b/internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go new file mode 100644 index 0000000000..a5c350affa --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go @@ -0,0 +1,38 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" + "database/sql" +) + +const selectFoo = `-- name: SelectFoo :many +SELECT bar FROM foo +` + +func (q *Queries) SelectFoo(ctx context.Context) ([]sql.NullString, error) { + rows, err := q.db.QueryContext(ctx, selectFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []sql.NullString + for rows.Next() { + var bar sql.NullString + if err := rows.Scan(&bar); err != nil { + return nil, err + } + items = append(items, bar) + } + 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/golang_invalid_sql_package/query.sql b/internal/endtoend/testdata/golang_invalid_sql_package/query.sql new file mode 100644 index 0000000000..e32e926b32 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/query.sql @@ -0,0 +1,2 @@ +-- name: SelectFoo :many +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/schema.sql b/internal/endtoend/testdata/golang_invalid_sql_package/schema.sql new file mode 100644 index 0000000000..e29621be57 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo ( + bar text +); diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json b/internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json new file mode 100644 index 0000000000..a6c726061c --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json @@ -0,0 +1,16 @@ +{ + "version": "2", + "sql": [ + { + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "gen": { + "go": { + "out": "db", + "sql_package": "pgx/5" + } + } + } + ] +} diff --git a/internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt b/internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt new file mode 100644 index 0000000000..249ae167b7 --- /dev/null +++ b/internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt @@ -0,0 +1,2 @@ +# package +error generating code: invalid options: unknown SQL package: pgx/5 diff --git a/internal/endtoend/testdata/having/mysql/go/db.go b/internal/endtoend/testdata/having/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/having/mysql/go/models.go b/internal/endtoend/testdata/having/mysql/go/models.go index b259b5d1eb..857d2a81f2 100644 --- a/internal/endtoend/testdata/having/mysql/go/models.go +++ b/internal/endtoend/testdata/having/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Weather struct { City string TempLo int32 diff --git a/internal/endtoend/testdata/having/mysql/go/query.sql.go b/internal/endtoend/testdata/having/mysql/go/query.sql.go index b5883f5e78..3dbecd981c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/having/postgresql/go/models.go b/internal/endtoend/testdata/having/postgresql/go/models.go index b259b5d1eb..857d2a81f2 100644 --- a/internal/endtoend/testdata/having/postgresql/go/models.go +++ b/internal/endtoend/testdata/having/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Weather struct { City string TempLo int32 diff --git a/internal/endtoend/testdata/having/postgresql/go/query.sql.go b/internal/endtoend/testdata/having/postgresql/go/query.sql.go index 059c489aa3..64f6b38ca9 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.23.0 +// sqlc v1.30.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 ec6da8bb67..3b95a6875a 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.23.0 +// sqlc v1.30.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 651f69bea8..0d38588e84 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.23.0 +// sqlc v1.30.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 1f63e214ed..a736165f20 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.23.0 +// sqlc v1.30.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 ae770074c2..77d5163554 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.23.0 +// sqlc v1.30.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 52416c92af..d97408441d 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.23.0 +// sqlc v1.30.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 ee4c57c50e..3a6e4a1287 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.23.0 +// sqlc v1.30.0 package hstore diff --git a/internal/endtoend/testdata/hstore/stdlib/go/db.go b/internal/endtoend/testdata/hstore/stdlib/go/db.go index c4dff22012..ae55290586 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.23.0 +// sqlc v1.30.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 0899361c7f..0fb01ca1c2 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.23.0 +// sqlc v1.30.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 aaa4b95237..8fcd53858d 100644 --- a/internal/endtoend/testdata/hstore/stdlib/go/models.go +++ b/internal/endtoend/testdata/hstore/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package hstore -import () - type Foo struct { Bar interface{} Baz interface{} diff --git a/internal/endtoend/testdata/identical_tables/mysql/go/db.go b/internal/endtoend/testdata/identical_tables/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e1dd18b39d..962e8d9e66 100644 --- a/internal/endtoend/testdata/identical_tables/mysql/go/models.go +++ b/internal/endtoend/testdata/identical_tables/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string } 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 3eb73794f6..3d72df8d22 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e1dd18b39d..962e8d9e66 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string } 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 2d4b85b5c0..6e424bf50d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e1dd18b39d..962e8d9e66 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string } 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 2d4b85b5c0..6e424bf50d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e1dd18b39d..962e8d9e66 100644 --- a/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string } 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 3eb73794f6..3d72df8d22 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e1dd18b39d..962e8d9e66 100644 --- a/internal/endtoend/testdata/identical_tables/sqlite/go/models.go +++ b/internal/endtoend/testdata/identical_tables/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID string } 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 3eb73794f6..3d72df8d22 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 d3e56d7d47..5041799d54 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.23.0 +// sqlc v1.30.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 1880559c1f..7e01490d7d 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 35bec17cd9..32099017df 100644 --- a/internal/endtoend/testdata/identifier_dollar_sign/db/models.go +++ b/internal/endtoend/testdata/identifier_dollar_sign/db/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package db - -import () 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 99dbde8464..357c440e49 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/in_union/mysql/go/db.go b/internal/endtoend/testdata/in_union/mysql/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/in_union/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/in_union/mysql/go/models.go b/internal/endtoend/testdata/in_union/mysql/go/models.go new file mode 100644 index 0000000000..cde8844271 --- /dev/null +++ b/internal/endtoend/testdata/in_union/mysql/go/models.go @@ -0,0 +1,25 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Author struct { + ID int32 + Name string + Bio sql.NullString +} + +type Book1 struct { + AuthorID int32 + Name sql.NullString +} + +type Book2 struct { + AuthorID int32 + Name sql.NullString +} diff --git a/internal/endtoend/testdata/in_union/mysql/go/query.sql.go b/internal/endtoend/testdata/in_union/mysql/go/query.sql.go new file mode 100644 index 0000000000..4da95c2e62 --- /dev/null +++ b/internal/endtoend/testdata/in_union/mysql/go/query.sql.go @@ -0,0 +1,38 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const getAuthors = `-- name: GetAuthors :many +SELECT id, name, bio FROM authors +WHERE author_id IN (SELECT author_id FROM book1 UNION SELECT author_id FROM book2) +` + +func (q *Queries) GetAuthors(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, getAuthors) + 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/in_union/mysql/query.sql b/internal/endtoend/testdata/in_union/mysql/query.sql new file mode 100644 index 0000000000..69606f538b --- /dev/null +++ b/internal/endtoend/testdata/in_union/mysql/query.sql @@ -0,0 +1,3 @@ +-- name: GetAuthors :many +SELECT * FROM authors +WHERE author_id IN (SELECT author_id FROM book1 UNION SELECT author_id FROM book2); diff --git a/internal/endtoend/testdata/in_union/mysql/schema.sql b/internal/endtoend/testdata/in_union/mysql/schema.sql new file mode 100644 index 0000000000..47264e2bbc --- /dev/null +++ b/internal/endtoend/testdata/in_union/mysql/schema.sql @@ -0,0 +1,15 @@ +CREATE TABLE authors ( + id int PRIMARY KEY, + name text NOT NULL, + bio text +); +CREATE TABLE book1 ( + author_id int PRIMARY KEY, + name text, + FOREIGN KEY (`author_id`) REFERENCES `authors` (`id`) ON DELETE CASCADE +); +CREATE TABLE book2 ( + author_id int PRIMARY KEY, + name text, + FOREIGN KEY (`author_id`) REFERENCES `authors` (`id`) ON DELETE CASCADE +); diff --git a/internal/endtoend/testdata/in_union/mysql/sqlc.json b/internal/endtoend/testdata/in_union/mysql/sqlc.json new file mode 100644 index 0000000000..974aa9ff9e --- /dev/null +++ b/internal/endtoend/testdata/in_union/mysql/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "engine": "mysql", + "path": "go", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/inflection/mysql/go/db.go b/internal/endtoend/testdata/inflection/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/inflection/mysql/go/models.go b/internal/endtoend/testdata/inflection/mysql/go/models.go index 8a02235845..dc018924d5 100644 --- a/internal/endtoend/testdata/inflection/mysql/go/models.go +++ b/internal/endtoend/testdata/inflection/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Calorie struct { ID string } @@ -14,6 +12,10 @@ type Campus struct { ID string } +type ProductMetadatum struct { + ID string +} + type ProductMetum struct { ID string } diff --git a/internal/endtoend/testdata/inflection/mysql/go/query.sql.go b/internal/endtoend/testdata/inflection/mysql/go/query.sql.go index 62b234e235..9dc173e9bc 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -9,6 +9,33 @@ import ( "context" ) +const getProductMetadata = `-- name: GetProductMetadata :many +SELECT id FROM product_metadata +` + +func (q *Queries) GetProductMetadata(ctx context.Context) ([]string, error) { + rows, err := q.db.QueryContext(ctx, getProductMetadata) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var id string + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const listCalories = `-- name: ListCalories :many SELECT id FROM calories ` diff --git a/internal/endtoend/testdata/inflection/mysql/query.sql b/internal/endtoend/testdata/inflection/mysql/query.sql index e3917086b9..74e1aaf8c3 100644 --- a/internal/endtoend/testdata/inflection/mysql/query.sql +++ b/internal/endtoend/testdata/inflection/mysql/query.sql @@ -9,3 +9,6 @@ SELECT * FROM product_meta; /* name: ListCalories :many */ SELECT * FROM calories; + +/* name: GetProductMetadata :many */ +SELECT * FROM product_metadata; \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/mysql/schema.sql b/internal/endtoend/testdata/inflection/mysql/schema.sql index b0d88c8695..f7d5c7c2a5 100644 --- a/internal/endtoend/testdata/inflection/mysql/schema.sql +++ b/internal/endtoend/testdata/inflection/mysql/schema.sql @@ -2,4 +2,4 @@ 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); - +CREATE TABLE product_metadata (id text not null); 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8a02235845..dc018924d5 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Calorie struct { ID string } @@ -14,6 +12,10 @@ type Campus struct { ID string } +type ProductMetadatum struct { + ID string +} + type ProductMetum struct { ID string } 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 5f88f48463..1f9673c638 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -9,6 +9,30 @@ import ( "context" ) +const getProductMetadata = `-- name: GetProductMetadata :many +SELECT id FROM product_metadata +` + +func (q *Queries) GetProductMetadata(ctx context.Context) ([]string, error) { + rows, err := q.db.Query(ctx, getProductMetadata) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var id string + 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 listCalories = `-- name: ListCalories :many SELECT id FROM calories ` diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql index 6e2828d458..abc0da2ef2 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql @@ -9,3 +9,6 @@ SELECT * FROM product_meta; -- name: ListCalories :many SELECT * FROM calories; + +-- name: GetProductMetadata :many +SELECT * FROM product_metadata; \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql index b0d88c8695..ad17ad7427 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql @@ -2,4 +2,4 @@ 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); - +CREATE TABLE product_metadata (id text not null); \ No newline at end of file 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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8a02235845..dc018924d5 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Calorie struct { ID string } @@ -14,6 +12,10 @@ type Campus struct { ID string } +type ProductMetadatum struct { + ID string +} + type ProductMetum struct { ID string } 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 5f88f48463..1f9673c638 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -9,6 +9,30 @@ import ( "context" ) +const getProductMetadata = `-- name: GetProductMetadata :many +SELECT id FROM product_metadata +` + +func (q *Queries) GetProductMetadata(ctx context.Context) ([]string, error) { + rows, err := q.db.Query(ctx, getProductMetadata) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var id string + 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 listCalories = `-- name: ListCalories :many SELECT id FROM calories ` diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql index 6e2828d458..abc0da2ef2 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql @@ -9,3 +9,6 @@ SELECT * FROM product_meta; -- name: ListCalories :many SELECT * FROM calories; + +-- name: GetProductMetadata :many +SELECT * FROM product_metadata; \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql index b0d88c8695..ad17ad7427 100644 --- a/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql +++ b/internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql @@ -2,4 +2,4 @@ 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); - +CREATE TABLE product_metadata (id text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8a02235845..dc018924d5 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Calorie struct { ID string } @@ -14,6 +12,10 @@ type Campus struct { ID string } +type ProductMetadatum struct { + ID string +} + type ProductMetum struct { ID string } 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 62b234e235..9dc173e9bc 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -9,6 +9,33 @@ import ( "context" ) +const getProductMetadata = `-- name: GetProductMetadata :many +SELECT id FROM product_metadata +` + +func (q *Queries) GetProductMetadata(ctx context.Context) ([]string, error) { + rows, err := q.db.QueryContext(ctx, getProductMetadata) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var id string + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const listCalories = `-- name: ListCalories :many SELECT id FROM calories ` diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql b/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql index 6e2828d458..abc0da2ef2 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql @@ -9,3 +9,6 @@ SELECT * FROM product_meta; -- name: ListCalories :many SELECT * FROM calories; + +-- name: GetProductMetadata :many +SELECT * FROM product_metadata; \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql index b0d88c8695..ad17ad7427 100644 --- a/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql @@ -2,4 +2,4 @@ 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); - +CREATE TABLE product_metadata (id text not null); \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/sqlite/go/db.go b/internal/endtoend/testdata/inflection/sqlite/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/inflection/sqlite/go/models.go b/internal/endtoend/testdata/inflection/sqlite/go/models.go index 8a02235845..dc018924d5 100644 --- a/internal/endtoend/testdata/inflection/sqlite/go/models.go +++ b/internal/endtoend/testdata/inflection/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Calorie struct { ID string } @@ -14,6 +12,10 @@ type Campus struct { ID string } +type ProductMetadatum struct { + ID string +} + type ProductMetum struct { ID string } diff --git a/internal/endtoend/testdata/inflection/sqlite/go/query.sql.go b/internal/endtoend/testdata/inflection/sqlite/go/query.sql.go index 62b234e235..9dc173e9bc 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -9,6 +9,33 @@ import ( "context" ) +const getProductMetadata = `-- name: GetProductMetadata :many +SELECT id FROM product_metadata +` + +func (q *Queries) GetProductMetadata(ctx context.Context) ([]string, error) { + rows, err := q.db.QueryContext(ctx, getProductMetadata) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var id string + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const listCalories = `-- name: ListCalories :many SELECT id FROM calories ` diff --git a/internal/endtoend/testdata/inflection/sqlite/query.sql b/internal/endtoend/testdata/inflection/sqlite/query.sql index e3917086b9..74e1aaf8c3 100644 --- a/internal/endtoend/testdata/inflection/sqlite/query.sql +++ b/internal/endtoend/testdata/inflection/sqlite/query.sql @@ -9,3 +9,6 @@ SELECT * FROM product_meta; /* name: ListCalories :many */ SELECT * FROM calories; + +/* name: GetProductMetadata :many */ +SELECT * FROM product_metadata; \ No newline at end of file diff --git a/internal/endtoend/testdata/inflection/sqlite/schema.sql b/internal/endtoend/testdata/inflection/sqlite/schema.sql index b0d88c8695..ad17ad7427 100644 --- a/internal/endtoend/testdata/inflection/sqlite/schema.sql +++ b/internal/endtoend/testdata/inflection/sqlite/schema.sql @@ -2,4 +2,4 @@ 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); - +CREATE TABLE product_metadata (id text not null); \ No newline at end of file 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 5b86c1634d..42c15bfccc 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Name string 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 0821b6dc55..a1f8824ce5 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 5b86c1634d..42c15bfccc 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Name string 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 0821b6dc55..a1f8824ce5 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.23.0 +// sqlc v1.30.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 deleted file mode 100644 index b01f524b88..0000000000 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/models.py +++ /dev/null @@ -1,22 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Bar: - id: int - name: str - - -@dataclasses.dataclass() -class Exclusions: - id: int - name: str - - -@dataclasses.dataclass() -class MyData: - id: int - name: str 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 deleted file mode 100644 index 100bef3789..0000000000 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/python/query.py +++ /dev/null @@ -1,89 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -from typing import Optional - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from querytest import models - - -DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:one -DELETE FROM bars WHERE id = :p1 RETURNING id, name -""" - - -DELETE_EXCLUSION_BY_ID = """-- name: delete_exclusion_by_id \\:one -DELETE FROM exclusions WHERE id = :p1 RETURNING id, name -""" - - -DELETE_MY_DATA_BY_ID = """-- name: delete_my_data_by_id \\:one -DELETE FROM my_data WHERE id = :p1 RETURNING id, name -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def delete_bar_by_id(self, *, id: int) -> Optional[models.Bar]: - row = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}).first() - if row is None: - return None - return models.Bar( - id=row[0], - name=row[1], - ) - - def delete_exclusion_by_id(self, *, id: int) -> Optional[models.Exclusions]: - row = self._conn.execute(sqlalchemy.text(DELETE_EXCLUSION_BY_ID), {"p1": id}).first() - if row is None: - return None - return models.Exclusions( - id=row[0], - name=row[1], - ) - - def delete_my_data_by_id(self, *, id: int) -> Optional[models.MyData]: - row = self._conn.execute(sqlalchemy.text(DELETE_MY_DATA_BY_ID), {"p1": id}).first() - if row is None: - return None - return models.MyData( - id=row[0], - name=row[1], - ) - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def delete_bar_by_id(self, *, id: int) -> Optional[models.Bar]: - row = (await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id})).first() - if row is None: - return None - return models.Bar( - id=row[0], - name=row[1], - ) - - async def delete_exclusion_by_id(self, *, id: int) -> Optional[models.Exclusions]: - row = (await self._conn.execute(sqlalchemy.text(DELETE_EXCLUSION_BY_ID), {"p1": id})).first() - if row is None: - return None - return models.Exclusions( - id=row[0], - name=row[1], - ) - - async def delete_my_data_by_id(self, *, id: int) -> Optional[models.MyData]: - row = (await self._conn.execute(sqlalchemy.text(DELETE_MY_DATA_BY_ID), {"p1": id})).first() - if row is None: - return None - return models.MyData( - id=row[0], - name=row[1], - ) 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 deleted file mode 100644 index f279a10738..0000000000 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/query.sql +++ /dev/null @@ -1,8 +0,0 @@ --- name: DeleteBarByID :one -DELETE FROM bars WHERE id = $1 RETURNING id, name; - --- name: DeleteMyDataByID :one -DELETE FROM my_data WHERE id = $1 RETURNING id, name; - --- name: DeleteExclusionByID :one -DELETE FROM exclusions 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 deleted file mode 100644 index ea5b797e08..0000000000 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/schema.sql +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 8a8691c3a5..0000000000 --- a/internal/endtoend/testdata/inflection_exclude_table_names/python_postgresql/sqlc.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.0.0.wasm", - "sha256": "aca83e1f59f8ffdc604774c2f6f9eb321a2b23e07dc83fc12289d25305fa065b" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true, - "inflection_exclude_table_names": [ - "my_data", - "exclusions" - ] - } - } - ] - } - ] -} 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 f480168303..fda938bb99 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.23.0 +// sqlc v1.30.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 a0f76ebd96..732bcac74a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 dfa13f1f47..5f27f6c6bd 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.23.0 +// sqlc v1.30.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 1497aa48b6..451bae46cb 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f480168303..fda938bb99 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.23.0 +// sqlc v1.30.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 ad0db17330..383b87b276 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_default_values/sqlite/go/db.go b/internal/endtoend/testdata/insert_default_values/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/insert_default_values/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/insert_default_values/sqlite/go/models.go b/internal/endtoend/testdata/insert_default_values/sqlite/go/models.go new file mode 100644 index 0000000000..0dcacbeefd --- /dev/null +++ b/internal/endtoend/testdata/insert_default_values/sqlite/go/models.go @@ -0,0 +1,9 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type Workspace struct { + ID int64 +} diff --git a/internal/endtoend/testdata/insert_default_values/sqlite/go/query.sql.go b/internal/endtoend/testdata/insert_default_values/sqlite/go/query.sql.go new file mode 100644 index 0000000000..669b57b2df --- /dev/null +++ b/internal/endtoend/testdata/insert_default_values/sqlite/go/query.sql.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const insertWorkspace = `-- name: InsertWorkspace :exec +INSERT INTO workspace DEFAULT VALUES +` + +func (q *Queries) InsertWorkspace(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, insertWorkspace) + return err +} diff --git a/internal/endtoend/testdata/insert_default_values/sqlite/query.sql b/internal/endtoend/testdata/insert_default_values/sqlite/query.sql new file mode 100644 index 0000000000..107afbe8b5 --- /dev/null +++ b/internal/endtoend/testdata/insert_default_values/sqlite/query.sql @@ -0,0 +1,2 @@ +-- name: InsertWorkspace :exec +INSERT INTO workspace DEFAULT VALUES; \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_default_values/sqlite/schema.sql b/internal/endtoend/testdata/insert_default_values/sqlite/schema.sql new file mode 100644 index 0000000000..f142b7c831 --- /dev/null +++ b/internal/endtoend/testdata/insert_default_values/sqlite/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE workspace ( + id INTEGER PRIMARY KEY AUTOINCREMENT +); \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_default_values/sqlite/sqlc.json b/internal/endtoend/testdata/insert_default_values/sqlite/sqlc.json new file mode 100644 index 0000000000..f8e8051087 --- /dev/null +++ b/internal/endtoend/testdata/insert_default_values/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "engine": "sqlite", + "path": "go", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} \ No newline at end of file diff --git a/internal/endtoend/testdata/insert_select/mysql/go/db.go b/internal/endtoend/testdata/insert_select/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 494f0945da..16bc8a120c 100644 --- a/internal/endtoend/testdata/insert_select/mysql/go/models.go +++ b/internal/endtoend/testdata/insert_select/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Name string Ready bool 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 7002181b07..cc635082ee 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 494f0945da..16bc8a120c 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Name string Ready bool 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 2de295ef3c..9e8dec1fb9 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 494f0945da..16bc8a120c 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Name string Ready bool 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 2de295ef3c..9e8dec1fb9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 494f0945da..16bc8a120c 100644 --- a/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Name string Ready bool 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 851ed0d5eb..ab34ae3502 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 494f0945da..16bc8a120c 100644 --- a/internal/endtoend/testdata/insert_select/sqlite/go/models.go +++ b/internal/endtoend/testdata/insert_select/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Name string Ready bool 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 7002181b07..cc635082ee 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e758bb2b1f..284ebb005e 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.23.0 +// sqlc v1.30.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 12ff2aba08..aee709a672 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/insert_select_invalid/mysql/query.sql b/internal/endtoend/testdata/insert_select_invalid/mysql/query.sql index cfd90fe55d..3311b32009 100644 --- a/internal/endtoend/testdata/insert_select_invalid/mysql/query.sql +++ b/internal/endtoend/testdata/insert_select_invalid/mysql/query.sql @@ -1,5 +1,3 @@ -CREATE TABLE foo (bar text); - -- name: InsertFoo :exec INSERT INTO foo (bar) SELECT 1, ?, ?; diff --git a/internal/endtoend/testdata/insert_select_invalid/mysql/schema.sql b/internal/endtoend/testdata/insert_select_invalid/mysql/schema.sql new file mode 100644 index 0000000000..d849628fb1 --- /dev/null +++ b/internal/endtoend/testdata/insert_select_invalid/mysql/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (bar text); diff --git a/internal/endtoend/testdata/insert_select_invalid/mysql/sqlc.json b/internal/endtoend/testdata/insert_select_invalid/mysql/sqlc.json index 0657f4db83..974aa9ff9e 100644 --- a/internal/endtoend/testdata/insert_select_invalid/mysql/sqlc.json +++ b/internal/endtoend/testdata/insert_select_invalid/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_invalid/mysql/stderr.txt b/internal/endtoend/testdata/insert_select_invalid/mysql/stderr.txt index 063b2a149a..91d0b8a06c 100644 --- a/internal/endtoend/testdata/insert_select_invalid/mysql/stderr.txt +++ b/internal/endtoend/testdata/insert_select_invalid/mysql/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:4:1: INSERT has more expressions than target columns +query.sql:1:1: INSERT has more expressions than target columns 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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 42bf218044..e4cf9d17ae 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.23.0 +// sqlc v1.30.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 3077d2e8c3..999d9b755d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 03c4c1e958..f2005088fc 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.23.0 +// sqlc v1.30.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 f20b1fd8a2..48ad158166 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 03c4c1e958..f2005088fc 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.23.0 +// sqlc v1.30.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 bcd1b573bf..87e661b275 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 92f1662b19..903f1becc4 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.23.0 +// sqlc v1.30.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 3b3d6deb32..1d1700f3a7 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 03c4c1e958..f2005088fc 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.23.0 +// sqlc v1.30.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 b82fdb41de..1fc6cf6420 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 72ea8630d3..dd3059b3f4 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.23.0 +// sqlc v1.30.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 322b52f119..020dbedda1 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 d72cef4b9b..5e934e1313 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index a8372ac2a3..a265e061b4 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 03c4c1e958..f2005088fc 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.23.0 +// sqlc v1.30.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 28b0fe616a..e8bba2efbd 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 03c4c1e958..f2005088fc 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.23.0 +// sqlc v1.30.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 d9e129fe54..7661064e22 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 92f1662b19..903f1becc4 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.23.0 +// sqlc v1.30.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 f840894f10..1f43dec81c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 03c4c1e958..f2005088fc 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.23.0 +// sqlc v1.30.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 795e26ced3..3d43beeadb 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e86ac9313a..9fec5373e2 100644 --- a/internal/endtoend/testdata/interval/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/interval/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool Interval int64 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 c8da26fa5e..db86257899 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 30eaffe3b5..95996c8d15 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.23.0 +// sqlc v1.30.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 c8da26fa5e..db86257899 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/interval/stdlib/go/models.go b/internal/endtoend/testdata/interval/stdlib/go/models.go index e86ac9313a..9fec5373e2 100644 --- a/internal/endtoend/testdata/interval/stdlib/go/models.go +++ b/internal/endtoend/testdata/interval/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool Interval int64 diff --git a/internal/endtoend/testdata/interval/stdlib/go/query.sql.go b/internal/endtoend/testdata/interval/stdlib/go/query.sql.go index 8f5baefb9a..5576d7614f 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v4/query.sql b/internal/endtoend/testdata/invalid_func_args/pgx/v4/query.sql index 46dbe9fa2d..e92c21d811 100644 --- a/internal/endtoend/testdata/invalid_func_args/pgx/v4/query.sql +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v4/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT random(1); diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt b/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt index 09d46d1f95..2693a08462 100644 --- a/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:1:8: function random(unknown) does not exist +query.sql:2:8: function random(unknown) does not exist 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 index 34430f733e..d211139c8a 100644 --- 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 @@ -1,2 +1,2 @@ # package querytest -query.sql:1:8: function random(integer) does not exist +query.sql:2:8: function random(integer) does not exist diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v5/query.sql b/internal/endtoend/testdata/invalid_func_args/pgx/v5/query.sql index 46dbe9fa2d..e92c21d811 100644 --- a/internal/endtoend/testdata/invalid_func_args/pgx/v5/query.sql +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v5/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT random(1); diff --git a/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt b/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt index 09d46d1f95..2693a08462 100644 --- a/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt +++ b/internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:1:8: function random(unknown) does not exist +query.sql:2:8: function random(unknown) does not exist 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 index 34430f733e..d211139c8a 100644 --- 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 @@ -1,2 +1,2 @@ # package querytest -query.sql:1:8: function random(integer) does not exist +query.sql:2:8: function random(integer) does not exist diff --git a/internal/endtoend/testdata/invalid_func_args/stdlib/query.sql b/internal/endtoend/testdata/invalid_func_args/stdlib/query.sql index 46dbe9fa2d..e92c21d811 100644 --- a/internal/endtoend/testdata/invalid_func_args/stdlib/query.sql +++ b/internal/endtoend/testdata/invalid_func_args/stdlib/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT random(1); diff --git a/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt b/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt index 09d46d1f95..2693a08462 100644 --- a/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt +++ b/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:1:8: function random(unknown) does not exist +query.sql:2:8: function random(unknown) does not exist 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 index 34430f733e..d211139c8a 100644 --- a/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt +++ b/internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:1:8: function random(integer) does not exist +query.sql:2:8: function random(integer) does not exist diff --git a/internal/endtoend/testdata/invalid_group_by_reference/mysql/exec.json b/internal/endtoend/testdata/invalid_group_by_reference/mysql/exec.json new file mode 100644 index 0000000000..0775566a14 --- /dev/null +++ b/internal/endtoend/testdata/invalid_group_by_reference/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "meta": { + "invalid_schema": true + } +} + diff --git a/internal/endtoend/testdata/invalid_group_by_reference/mysql/query.sql b/internal/endtoend/testdata/invalid_group_by_reference/mysql/query.sql index 75a8e210fd..b036fba240 100644 --- a/internal/endtoend/testdata/invalid_group_by_reference/mysql/query.sql +++ b/internal/endtoend/testdata/invalid_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 * FROM authors diff --git a/internal/endtoend/testdata/invalid_group_by_reference/mysql/schema.sql b/internal/endtoend/testdata/invalid_group_by_reference/mysql/schema.sql new file mode 100644 index 0000000000..5333d484a6 --- /dev/null +++ b/internal/endtoend/testdata/invalid_group_by_reference/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/invalid_group_by_reference/mysql/sqlc.json b/internal/endtoend/testdata/invalid_group_by_reference/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/invalid_group_by_reference/mysql/sqlc.json +++ b/internal/endtoend/testdata/invalid_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/invalid_group_by_reference/mysql/stderr.txt b/internal/endtoend/testdata/invalid_group_by_reference/mysql/stderr.txt index 1fc9998d4c..d686d4f4d8 100644 --- a/internal/endtoend/testdata/invalid_group_by_reference/mysql/stderr.txt +++ b/internal/endtoend/testdata/invalid_group_by_reference/mysql/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:11:10: column reference "invalid_reference" not found +query.sql:4:10: column reference "invalid_reference" not found 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 7d918dffe7..9d485b5f16 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.23.0 +// sqlc v1.30.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 5098f4e665..d3515f1ede 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.23.0 +// sqlc v1.30.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 e3155ecdd2..2ce1040c41 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/invalid_named_params/mysql/query.sql b/internal/endtoend/testdata/invalid_named_params/mysql/query.sql index 1ea4a9e5dc..349d2c2ccb 100644 --- a/internal/endtoend/testdata/invalid_named_params/mysql/query.sql +++ b/internal/endtoend/testdata/invalid_named_params/mysql/query.sql @@ -1,8 +1,3 @@ -CREATE TABLE authors ( - id BIGINT PRIMARY KEY, - bio TEXT -); - -- name: ListAuthors :one SELECT * FROM authors diff --git a/internal/endtoend/testdata/invalid_named_params/mysql/schema.sql b/internal/endtoend/testdata/invalid_named_params/mysql/schema.sql new file mode 100644 index 0000000000..9804a5cd1b --- /dev/null +++ b/internal/endtoend/testdata/invalid_named_params/mysql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + bio TEXT +); diff --git a/internal/endtoend/testdata/invalid_named_params/mysql/sqlc.json b/internal/endtoend/testdata/invalid_named_params/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/invalid_named_params/mysql/sqlc.json +++ b/internal/endtoend/testdata/invalid_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/invalid_queries_foo/pgx/v4/query.sql b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql index 0e98fb622d..06644a2cd3 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql @@ -15,3 +15,6 @@ UPDATE foo SET id = $2 WHERE id = $1; -- name: InsertFoo :one INSERT INTO foo (id) VALUES ($1); + +-- name: InsertFoo :batchone +INSERT INTO foo (id) VALUES ($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 06ec54327f..8c745b7e3b 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt @@ -4,4 +4,5 @@ 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 +query.sql:17:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:20:1: query "InsertFoo" specifies parameter ":batchone" without containing a RETURNING clause 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 0e98fb622d..06644a2cd3 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql @@ -15,3 +15,6 @@ UPDATE foo SET id = $2 WHERE id = $1; -- name: InsertFoo :one INSERT INTO foo (id) VALUES ($1); + +-- name: InsertFoo :batchone +INSERT INTO foo (id) VALUES ($1); 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 06ec54327f..8c745b7e3b 100644 --- a/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt +++ b/internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt @@ -4,4 +4,5 @@ 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 +query.sql:17:1: query "InsertFoo" specifies parameter ":one" without containing a RETURNING clause +query.sql:20:1: query "InsertFoo" specifies parameter ":batchone" without containing a RETURNING clause diff --git a/internal/endtoend/testdata/invalid_table_alias/mysql/query.sql b/internal/endtoend/testdata/invalid_table_alias/mysql/query.sql index 22482fb724..52f5aae051 100644 --- a/internal/endtoend/testdata/invalid_table_alias/mysql/query.sql +++ b/internal/endtoend/testdata/invalid_table_alias/mysql/query.sql @@ -1,10 +1,3 @@ --- https://github.com/sqlc-dev/sqlc/issues/437 -CREATE TABLE authors ( - id INT PRIMARY KEY, - name VARCHAR(255) NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors a diff --git a/internal/endtoend/testdata/invalid_table_alias/mysql/schema.sql b/internal/endtoend/testdata/invalid_table_alias/mysql/schema.sql new file mode 100644 index 0000000000..ee27f30abe --- /dev/null +++ b/internal/endtoend/testdata/invalid_table_alias/mysql/schema.sql @@ -0,0 +1,7 @@ +-- https://github.com/sqlc-dev/sqlc/issues/437 +CREATE TABLE authors ( + id INT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + bio text +); + diff --git a/internal/endtoend/testdata/invalid_table_alias/mysql/sqlc.json b/internal/endtoend/testdata/invalid_table_alias/mysql/sqlc.json index 534b7e24e9..0390f67889 100644 --- a/internal/endtoend/testdata/invalid_table_alias/mysql/sqlc.json +++ b/internal/endtoend/testdata/invalid_table_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/invalid_table_alias/mysql/stderr.txt b/internal/endtoend/testdata/invalid_table_alias/mysql/stderr.txt index 810c893a70..1eddeaac99 100644 --- a/internal/endtoend/testdata/invalid_table_alias/mysql/stderr.txt +++ b/internal/endtoend/testdata/invalid_table_alias/mysql/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:11:9: table alias "p" does not exist +query.sql:4:9: table alias "p" does not exist diff --git a/internal/endtoend/testdata/invalid_table_alias/postgresql/exec.json b/internal/endtoend/testdata/invalid_table_alias/postgresql/exec.json new file mode 100644 index 0000000000..9f208fb2df --- /dev/null +++ b/internal/endtoend/testdata/invalid_table_alias/postgresql/exec.json @@ -0,0 +1,3 @@ +{ + "os": ["darwin", "linux"] +} diff --git a/internal/endtoend/testdata/join_alias/mysql/go/db.go b/internal/endtoend/testdata/join_alias/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 ae6442d0f9..4dae8de5db 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.23.0 +// sqlc v1.30.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 311a3fddf6..932153ec78 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 4673501476..3ae25caf06 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.23.0 +// sqlc v1.30.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 d778aaf611..13a5ad6ceb 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 190e09b2af..69068f3a7f 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.23.0 +// sqlc v1.30.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 a0705f61fb..5761c7cd02 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4673501476..3ae25caf06 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.23.0 +// sqlc v1.30.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 6c7cdca63a..c304c38c04 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 86b88fa58e..5a3a4a1b05 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.23.0 +// sqlc v1.30.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 b61d81c5d9..8ac1da98d8 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8b656b1387..f069a6fbed 100644 --- a/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go +++ b/internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type A struct { ID int64 A string 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 13cbb65cbf..ee33f2706a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3567367e44..024b8245df 100644 --- a/internal/endtoend/testdata/join_from/mysql/go/models.go +++ b/internal/endtoend/testdata/join_from/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Login string } 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 43f80cceea..67c067f458 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 3567367e44..024b8245df 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Login string } 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 1993f3d737..c30f5d428d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 3567367e44..024b8245df 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Login string } 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 1993f3d737..c30f5d428d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3567367e44..024b8245df 100644 --- a/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Login string } 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 4bfc7c7812..ff1c5fd82d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3567367e44..024b8245df 100644 --- a/internal/endtoend/testdata/join_from/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_from/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Login string } 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 43f80cceea..67c067f458 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 742b69e56a..7453c9d172 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.23.0 +// sqlc v1.30.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 70624186df..3e92e19ac6 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c5c0dd0b1a..ae9173ef9e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Email string } 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 a5166b8694..aceacc4058 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 ec5a65278e..2d9d727572 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.23.0 +// sqlc v1.30.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 20ff5ee610..6f5396e796 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 35802403b2..3b3296b874 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.23.0 +// sqlc v1.30.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 3746c6bf8e..1fdd44a0bd 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_left/mysql/schema.sql b/internal/endtoend/testdata/join_left/mysql/schema.sql index a73a02ca00..9b15eaea36 100644 --- a/internal/endtoend/testdata/join_left/mysql/schema.sql +++ b/internal/endtoend/testdata/join_left/mysql/schema.sql @@ -28,11 +28,11 @@ CREATE TABLE super_authors ( CREATE TABLE users_2 ( user_id INT PRIMARY KEY, user_nickname VARCHAR(30) UNIQUE NOT NULL, - user_email TEXT UNIQUE NOT NULL, + user_email VARCHAR(20) 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_google_id VARCHAR(20) UNIQUE NULL, + user_apple_id VARCHAR(20) UNIQUE NULL, user_bio VARCHAR(160) NOT NULL DEFAULT '', user_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, user_avatar_id INT UNIQUE NULL diff --git a/internal/endtoend/testdata/join_left/postgresql/go/db.go b/internal/endtoend/testdata/join_left/postgresql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d5bfbc745b..37edc6151f 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.23.0 +// sqlc v1.30.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 d4f3525d1f..5be30a8b98 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b9631eee05..92f5ad97a9 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.23.0 +// sqlc v1.30.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 ebef3c8b10..6bdea7c263 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f6865d1688..fc10ae1ebe 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.23.0 +// sqlc v1.30.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 820d70e51c..50025f9f94 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f6865d1688..fc10ae1ebe 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.23.0 +// sqlc v1.30.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 686fe10c68..f72cc64440 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9a5ed76ea0..7d416b37c4 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.23.0 +// sqlc v1.30.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 4abb523351..82a6d25562 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 56e21b5c44..f2f59a2260 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { FooID int64 Info string 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 5c41c2472e..2afea551ce 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 42bf218044..e4cf9d17ae 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.23.0 +// sqlc v1.30.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 21ef3c4f59..c6a217b08d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 c5c0dd0b1a..ae9173ef9e 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Email string } 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 90c9e21753..167045b212 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eea7b1f9f5..7453c9d172 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.23.0 +// sqlc v1.30.0 package querytest @@ -9,10 +9,10 @@ import ( ) type Bar struct { - ID uint64 + ID int32 } type Foo struct { - ID uint64 + ID int32 BarID sql.NullInt32 } 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 46068b6d4c..9996f8c927 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -18,12 +18,12 @@ WHERE f.id = ? ` type RightJoinRow struct { - ID sql.NullInt64 + ID sql.NullInt32 BarID sql.NullInt32 - ID_2 uint64 + ID_2 int32 } -func (q *Queries) RightJoin(ctx context.Context, id uint64) ([]RightJoinRow, error) { +func (q *Queries) RightJoin(ctx context.Context, id int32) ([]RightJoinRow, error) { rows, err := q.db.QueryContext(ctx, rightJoin, id) if err != nil { return nil, err diff --git a/internal/endtoend/testdata/join_right/mysql/schema.sql b/internal/endtoend/testdata/join_right/mysql/schema.sql index 0559fc8ab8..f0f2cb1685 100644 --- a/internal/endtoend/testdata/join_right/mysql/schema.sql +++ b/internal/endtoend/testdata/join_right/mysql/schema.sql @@ -1,3 +1,8 @@ -CREATE TABLE foo (id serial not null, bar_id int references bar(id)); -CREATE TABLE bar (id serial not null); +CREATE TABLE bar ( + id integer not null, + UNIQUE(id) +); + +CREATE TABLE foo (id integer not null, bar_id integer references bar(id)); + diff --git a/internal/endtoend/testdata/join_right/postgresql/go/db.go b/internal/endtoend/testdata/join_right/postgresql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 742b69e56a..7453c9d172 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.23.0 +// sqlc v1.30.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 379e165d58..df23abc123 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 fc431ccdf3..8594c6e575 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/go/models.go +++ b/internal/endtoend/testdata/join_table_name/mysql/go/models.go @@ -1,16 +1,18 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () +import ( + "database/sql" +) type Bar struct { - ID uint64 + ID int32 } type Foo struct { - ID uint64 - Bar uint64 + ID int32 + Bar sql.NullInt32 } 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 e837a70169..df1c751314 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -17,13 +17,13 @@ WHERE bar.id = ? AND foo.id = ? ` type TableNameParams struct { - ID uint64 - ID_2 uint64 + ID int32 + ID_2 int32 } -func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (uint64, error) { +func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (int32, error) { row := q.db.QueryRowContext(ctx, tableName, arg.ID, arg.ID_2) - var id uint64 + var id int32 err := row.Scan(&id) return id, err } diff --git a/internal/endtoend/testdata/join_table_name/mysql/schema.sql b/internal/endtoend/testdata/join_table_name/mysql/schema.sql index b0f5adf952..f54c3b485d 100644 --- a/internal/endtoend/testdata/join_table_name/mysql/schema.sql +++ b/internal/endtoend/testdata/join_table_name/mysql/schema.sql @@ -1,3 +1,7 @@ -CREATE TABLE bar (id serial not null); -CREATE TABLE foo (id serial not null, bar serial references bar(id)); +CREATE TABLE bar ( + id integer not null, + UNIQUE (id) +); + +CREATE TABLE foo (id integer not null, bar integer references bar(id)); 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 99bd0dd9e3..8594c6e575 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.23.0 +// sqlc v1.30.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 cd48138d59..bf5d3b2013 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 6176979151..c7e5e6a8d0 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.23.0 +// sqlc v1.30.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 cd48138d59..bf5d3b2013 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 99bd0dd9e3..8594c6e575 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.23.0 +// sqlc v1.30.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 8047bb8497..2030d9898e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d8b9261236..10a2b6f6f5 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.23.0 +// sqlc v1.30.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 4bed0123b7..23281c26f9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 ef1399d0b0..fae11cfa19 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 } @@ -16,5 +14,5 @@ type Baz struct { type Foo struct { BarID uint64 - BazID uint64 + BazID int32 } 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 f8a1ee3c14..f5b3386fc2 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/join_two_tables/mysql/schema.sql b/internal/endtoend/testdata/join_two_tables/mysql/schema.sql index 86eb87a1ff..d8b5e500cf 100644 --- a/internal/endtoend/testdata/join_two_tables/mysql/schema.sql +++ b/internal/endtoend/testdata/join_two_tables/mysql/schema.sql @@ -1,4 +1,4 @@ -CREATE TABLE foo (bar_id serial not null, baz_id serial not null); +CREATE TABLE foo (bar_id serial not null, baz_id integer 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/go/db.go b/internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/db.go index 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 2d7e4399d1..ad2b376d3a 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 a988eaebd4..b2d903d310 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 2d7e4399d1..ad2b376d3a 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 a988eaebd4..b2d903d310 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2d7e4399d1..ad2b376d3a 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 f8a1ee3c14..f5b3386fc2 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 03384c2cf9..b723af0c72 100644 --- a/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_two_tables/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 f8a1ee3c14..f5b3386fc2 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 4705792343..f762916256 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.23.0 +// sqlc v1.30.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 518dfe71ae..29e6561e64 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 d7f17c43cb..f4eaade85e 100644 --- a/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type T1 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 index 1a5049f417..d3031ccddf 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 83e2cda180..ae80c37712 100644 --- a/internal/endtoend/testdata/join_where_clause/mysql/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 Owner string 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 9685d91b2d..cd4f274eb6 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 86badc6298..b133b28e36 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Owner string 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 3aed45c8ec..da6dc818c3 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 86badc6298..b133b28e36 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Owner string 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 3aed45c8ec..da6dc818c3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 86badc6298..b133b28e36 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Owner string 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 80a5bf0555..a3035e456d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 266830f6d0..ec6bbfe120 100644 --- a/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go +++ b/internal/endtoend/testdata/join_where_clause/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 Owner string 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 c3f8bbc5d8..46b1bcbdfa 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json/mysql/go/copyfrom.go b/internal/endtoend/testdata/json/mysql/go/copyfrom.go new file mode 100644 index 0000000000..e27ad3e735 --- /dev/null +++ b/internal/endtoend/testdata/json/mysql/go/copyfrom.go @@ -0,0 +1,51 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: copyfrom.go + +package querytest + +import ( + "context" + "fmt" + "io" + "sync/atomic" + + "github.com/go-sql-driver/mysql" + "github.com/hexon/mysqltsv" +) + +var readerHandlerSequenceForBulkInsert uint32 = 1 + +func convertRowsForBulkInsert(w *io.PipeWriter, arg []BulkInsertParams) { + e := mysqltsv.NewEncoder(w, 2, nil) + for _, row := range arg { + e.AppendBytes(row.A) + e.AppendBytes(row.B) + } + w.CloseWithError(e.Close()) +} + +// BulkInsert uses MySQL's LOAD DATA LOCAL INFILE and is not atomic. +// +// Errors and duplicate keys are treated as warnings and insertion will +// continue, even without an error for some cases. Use this in a transaction +// and use SHOW WARNINGS to check for any problems and roll back if you want to. +// +// Check the documentation for more information: +// https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-error-handling +func (q *Queries) BulkInsert(ctx context.Context, arg []BulkInsertParams) (int64, error) { + pr, pw := io.Pipe() + defer pr.Close() + rh := fmt.Sprintf("BulkInsert_%d", atomic.AddUint32(&readerHandlerSequenceForBulkInsert, 1)) + mysql.RegisterReaderHandler(rh, func() io.Reader { return pr }) + defer mysql.DeregisterReaderHandler(rh) + go convertRowsForBulkInsert(pw, arg) + // The string interpolation is necessary because LOAD DATA INFILE requires + // the file name to be given as a literal string. + result, err := q.db.ExecContext(ctx, fmt.Sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE `foo` %s (a, b)", "Reader::"+rh, mysqltsv.Escaping)) + if err != nil { + return 0, err + } + return result.RowsAffected() +} diff --git a/internal/endtoend/testdata/json/mysql/go/db.go b/internal/endtoend/testdata/json/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/json/mysql/go/models.go b/internal/endtoend/testdata/json/mysql/go/models.go index fecf5d95ef..ce2b99dec7 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.23.0 +// sqlc v1.30.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 28068eca88..4301cd3454 100644 --- a/internal/endtoend/testdata/json/mysql/go/query.sql.go +++ b/internal/endtoend/testdata/json/mysql/go/query.sql.go @@ -1,14 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 // source: query.sql package querytest import ( "context" + "encoding/json" ) +const bulkInsert = `-- name: BulkInsert :copyfrom +INSERT INTO foo (a, b) VALUES (?, ?) +` + +type BulkInsertParams struct { + A json.RawMessage + B json.RawMessage +} + const selectFoo = `-- name: SelectFoo :exec SELECT a, b FROM foo ` diff --git a/internal/endtoend/testdata/json/mysql/query.sql b/internal/endtoend/testdata/json/mysql/query.sql index a8629cc2ae..927e597562 100644 --- a/internal/endtoend/testdata/json/mysql/query.sql +++ b/internal/endtoend/testdata/json/mysql/query.sql @@ -1,2 +1,5 @@ -- name: SelectFoo :exec SELECT * FROM foo; + +-- name: BulkInsert :copyfrom +INSERT INTO foo (a, b) VALUES (?, ?); diff --git a/internal/endtoend/testdata/json/mysql/sqlc.json b/internal/endtoend/testdata/json/mysql/sqlc.json index e41c39e8b3..b1127e200f 100644 --- a/internal/endtoend/testdata/json/mysql/sqlc.json +++ b/internal/endtoend/testdata/json/mysql/sqlc.json @@ -4,6 +4,7 @@ { "path": "go", "engine": "mysql", + "sql_driver": "github.com/go-sql-driver/mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 5ca694aaec..e2a09cd7aa 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.23.0 +// sqlc v1.30.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 9451d0b10e..907ec22cd8 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0ac72326d5..5157c6524c 100644 --- a/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { A []byte B []byte 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 9451d0b10e..907ec22cd8 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 159ff795e9..b8d447e7d8 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.23.0 +// sqlc v1.30.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 a2593c1da8..7144c0f706 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 3b39aa0172..d28bfc19ea 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type SysAction struct { ID int64 Code string 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 88f77631f4..2c13c0ffa9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 be3c12f406..d075c6b1b7 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 a985e03305..1d1a952ec1 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 4efadf2183..65c574c522 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f34b69adef..07bd3e462b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 787d469d2b..2d57f3dd61 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/json_param_type/sqlite/go/db.go b/internal/endtoend/testdata/json_param_type/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/json_param_type/sqlite/go/models.go b/internal/endtoend/testdata/json_param_type/sqlite/go/models.go new file mode 100644 index 0000000000..91b6d74f4c --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/sqlite/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type User struct { + ID sql.NullInt64 + Metadata sql.NullString +} diff --git a/internal/endtoend/testdata/json_param_type/sqlite/go/query.sql.go b/internal/endtoend/testdata/json_param_type/sqlite/go/query.sql.go new file mode 100644 index 0000000000..c73e37a1fa --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/sqlite/go/query.sql.go @@ -0,0 +1,22 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" +) + +const findByAddress = `-- name: FindByAddress :one +SELECT id, metadata FROM "user" WHERE "metadata"->>'address1' = ?1 LIMIT 1 +` + +func (q *Queries) FindByAddress(ctx context.Context, metadata sql.NullString) (User, error) { + row := q.db.QueryRowContext(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/sqlite/query.sql b/internal/endtoend/testdata/json_param_type/sqlite/query.sql new file mode 100644 index 0000000000..7060d6e58e --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/sqlite/query.sql @@ -0,0 +1,2 @@ +-- name: FindByAddress :one +SELECT * FROM "user" WHERE "metadata"->>'address1' = ?1 LIMIT 1; \ No newline at end of file diff --git a/internal/endtoend/testdata/json_param_type/sqlite/schema.sql b/internal/endtoend/testdata/json_param_type/sqlite/schema.sql new file mode 100644 index 0000000000..26c82958a4 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/sqlite/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE "user" ( + "id" INT, + "metadata" TEXT +); diff --git a/internal/endtoend/testdata/json_param_type/sqlite/sqlc.yaml b/internal/endtoend/testdata/json_param_type/sqlite/sqlc.yaml new file mode 100644 index 0000000000..0608985da1 --- /dev/null +++ b/internal/endtoend/testdata/json_param_type/sqlite/sqlc.yaml @@ -0,0 +1,9 @@ +version: "2" +sql: + - engine: "sqlite" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" \ No newline at end of file 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 9cd16e1396..b19a4d2547 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.23.0 +// sqlc v1.30.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 dae2324a10..6cd8cea48d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 7949830784..39d7af1488 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.23.0 +// sqlc v1.30.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 dae2324a10..6cd8cea48d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9cd16e1396..b19a4d2547 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.23.0 +// sqlc v1.30.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 9de425e21f..3d8e6df6d4 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 274d3b6a24..e233ecddc1 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.23.0 +// sqlc v1.30.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 dae2324a10..6cd8cea48d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 98b899d64a..796a5df392 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.23.0 +// sqlc v1.30.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 dae2324a10..6cd8cea48d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 274d3b6a24..e233ecddc1 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.23.0 +// sqlc v1.30.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 9de425e21f..3d8e6df6d4 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e717af4c86..4b2e4b0bda 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.23.0 +// sqlc v1.30.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 dae2324a10..6cd8cea48d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0bb1f13238..e162102cc6 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.23.0 +// sqlc v1.30.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 dae2324a10..6cd8cea48d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e717af4c86..4b2e4b0bda 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.23.0 +// sqlc v1.30.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 9de425e21f..3d8e6df6d4 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 420e311723..f3dde5226d 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.23.0 +// sqlc v1.30.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 8d20e44b0b..56bf7b7aab 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 44030b17fb..d0b81a55dc 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.23.0 +// sqlc v1.30.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 8d20e44b0b..56bf7b7aab 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 e859e56910..09ebb453dc 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.23.0 +// sqlc v1.30.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 8d20e44b0b..56bf7b7aab 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 44030b17fb..d0b81a55dc 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.23.0 +// sqlc v1.30.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 8d20e44b0b..56bf7b7aab 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 44030b17fb..d0b81a55dc 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.23.0 +// sqlc v1.30.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 8d20e44b0b..56bf7b7aab 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/jsonb/pgx/go/db.go b/internal/endtoend/testdata/jsonb/pgx/go/db.go new file mode 100644 index 0000000000..1e00549714 --- /dev/null +++ b/internal/endtoend/testdata/jsonb/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/jsonb/pgx/go/models.go b/internal/endtoend/testdata/jsonb/pgx/go/models.go new file mode 100644 index 0000000000..5157c6524c --- /dev/null +++ b/internal/endtoend/testdata/jsonb/pgx/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type Foo struct { + A []byte + B []byte + C []byte + D []byte +} diff --git a/internal/endtoend/testdata/jsonb/pgx/go/query.sql.go b/internal/endtoend/testdata/jsonb/pgx/go/query.sql.go new file mode 100644 index 0000000000..b26d65ae1c --- /dev/null +++ b/internal/endtoend/testdata/jsonb/pgx/go/query.sql.go @@ -0,0 +1,50 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const insertFoo = `-- name: InsertFoo :exec +INSERT INTO foo ( + a, + b, + c, + d +) VALUES ( + $1, + $2, + $3, + $4 +) RETURNING a, b, c, d +` + +type InsertFooParams struct { + A []byte + B []byte + C []byte + D []byte +} + +func (q *Queries) InsertFoo(ctx context.Context, arg InsertFooParams) error { + _, err := q.db.Exec(ctx, insertFoo, + arg.A, + arg.B, + arg.C, + arg.D, + ) + return err +} + +const selectFoo = `-- name: SelectFoo :exec +SELECT a, b, c, d FROM foo +` + +func (q *Queries) SelectFoo(ctx context.Context) error { + _, err := q.db.Exec(ctx, selectFoo) + return err +} diff --git a/internal/endtoend/testdata/jsonb/pgx/query.sql b/internal/endtoend/testdata/jsonb/pgx/query.sql new file mode 100644 index 0000000000..6959bd1a70 --- /dev/null +++ b/internal/endtoend/testdata/jsonb/pgx/query.sql @@ -0,0 +1,15 @@ +-- name: InsertFoo :exec +INSERT INTO foo ( + a, + b, + c, + d +) VALUES ( + @a, + @b, + @c, + @d +) RETURNING *; + +-- name: SelectFoo :exec +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/jsonb/pgx/schema.sql b/internal/endtoend/testdata/jsonb/pgx/schema.sql new file mode 100644 index 0000000000..6b4a1bb0fd --- /dev/null +++ b/internal/endtoend/testdata/jsonb/pgx/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/jsonb/pgx/sqlc.json b/internal/endtoend/testdata/jsonb/pgx/sqlc.json new file mode 100644 index 0000000000..32ede07158 --- /dev/null +++ b/internal/endtoend/testdata/jsonb/pgx/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/jsonb/sqlite/go/db.go b/internal/endtoend/testdata/jsonb/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/jsonb/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/jsonb/sqlite/go/models.go b/internal/endtoend/testdata/jsonb/sqlite/go/models.go new file mode 100644 index 0000000000..3980b20cad --- /dev/null +++ b/internal/endtoend/testdata/jsonb/sqlite/go/models.go @@ -0,0 +1,16 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "encoding/json" +) + +type Foo struct { + A json.RawMessage + B json.RawMessage + C json.RawMessage + D json.RawMessage +} diff --git a/internal/endtoend/testdata/jsonb/sqlite/go/query.sql.go b/internal/endtoend/testdata/jsonb/sqlite/go/query.sql.go new file mode 100644 index 0000000000..448182e3dd --- /dev/null +++ b/internal/endtoend/testdata/jsonb/sqlite/go/query.sql.go @@ -0,0 +1,51 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" + "encoding/json" +) + +const insertFoo = `-- name: InsertFoo :exec +INSERT INTO foo ( + a, + b, + c, + d +) VALUES ( + ?1, + ?2, + ?3, + ?4 +) RETURNING a, json(b), c, json(d) +` + +type InsertFooParams struct { + A json.RawMessage + B json.RawMessage + C json.RawMessage + D json.RawMessage +} + +func (q *Queries) InsertFoo(ctx context.Context, arg InsertFooParams) error { + _, err := q.db.ExecContext(ctx, insertFoo, + arg.A, + arg.B, + arg.C, + arg.D, + ) + return err +} + +const selectFoo = `-- name: SelectFoo :exec +SELECT a, json(b), c, json(d) FROM foo +` + +func (q *Queries) SelectFoo(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, selectFoo) + return err +} diff --git a/internal/endtoend/testdata/jsonb/sqlite/query.sql b/internal/endtoend/testdata/jsonb/sqlite/query.sql new file mode 100644 index 0000000000..6959bd1a70 --- /dev/null +++ b/internal/endtoend/testdata/jsonb/sqlite/query.sql @@ -0,0 +1,15 @@ +-- name: InsertFoo :exec +INSERT INTO foo ( + a, + b, + c, + d +) VALUES ( + @a, + @b, + @c, + @d +) RETURNING *; + +-- name: SelectFoo :exec +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/jsonb/sqlite/schema.sql b/internal/endtoend/testdata/jsonb/sqlite/schema.sql new file mode 100644 index 0000000000..6b4a1bb0fd --- /dev/null +++ b/internal/endtoend/testdata/jsonb/sqlite/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/jsonb/sqlite/sqlc.json b/internal/endtoend/testdata/jsonb/sqlite/sqlc.json new file mode 100644 index 0000000000..cd66df063b --- /dev/null +++ b/internal/endtoend/testdata/jsonb/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "sqlite", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/limit/mysql/go/db.go b/internal/endtoend/testdata/limit/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/limit/mysql/go/models.go b/internal/endtoend/testdata/limit/mysql/go/models.go index 107ba794df..04bc70ad65 100644 --- a/internal/endtoend/testdata/limit/mysql/go/models.go +++ b/internal/endtoend/testdata/limit/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } diff --git a/internal/endtoend/testdata/limit/mysql/go/query.sql.go b/internal/endtoend/testdata/limit/mysql/go/query.sql.go index af9e70dfda..5af60506f4 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 107ba794df..04bc70ad65 100644 --- a/internal/endtoend/testdata/limit/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/limit/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } 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 58e971ccc9..d40cf94a08 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 107ba794df..04bc70ad65 100644 --- a/internal/endtoend/testdata/limit/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/limit/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } 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 58e971ccc9..d40cf94a08 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/limit/sqlite/go/models.go b/internal/endtoend/testdata/limit/sqlite/go/models.go index 107ba794df..04bc70ad65 100644 --- a/internal/endtoend/testdata/limit/sqlite/go/models.go +++ b/internal/endtoend/testdata/limit/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } diff --git a/internal/endtoend/testdata/limit/sqlite/go/query.sql.go b/internal/endtoend/testdata/limit/sqlite/go/query.sql.go index b1012b2976..31a0ab2993 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/limit/stdlib/go/models.go b/internal/endtoend/testdata/limit/stdlib/go/models.go index 107ba794df..04bc70ad65 100644 --- a/internal/endtoend/testdata/limit/stdlib/go/models.go +++ b/internal/endtoend/testdata/limit/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } diff --git a/internal/endtoend/testdata/limit/stdlib/go/query.sql.go b/internal/endtoend/testdata/limit/stdlib/go/query.sql.go index 1bc1aec899..ab53cad1b7 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8d607bad92..061b030b06 100644 --- a/internal/endtoend/testdata/lower/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/lower/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Bat string 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 543499e121..2159e93436 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8d607bad92..061b030b06 100644 --- a/internal/endtoend/testdata/lower/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/lower/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Bat string 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 543499e121..2159e93436 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/lower/stdlib/go/models.go b/internal/endtoend/testdata/lower/stdlib/go/models.go index 8d607bad92..061b030b06 100644 --- a/internal/endtoend/testdata/lower/stdlib/go/models.go +++ b/internal/endtoend/testdata/lower/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Bat string diff --git a/internal/endtoend/testdata/lower/stdlib/go/query.sql.go b/internal/endtoend/testdata/lower/stdlib/go/query.sql.go index 491f238ee3..3bedc86ba3 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8d607bad92..061b030b06 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Bat string 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 6abbb72351..bd5949f23b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8d607bad92..061b030b06 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Bat string 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 6abbb72351..bd5949f23b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8d607bad92..061b030b06 100644 --- a/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go +++ b/internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string Bat string 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 3f78b3cfd8..79959a216a 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cbbd8497cf..6399c72cfb 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.23.0 +// sqlc v1.30.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 44019286b0..23244b5220 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 aeeee74596..c5fd0c2555 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.23.0 +// sqlc v1.30.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 44019286b0..23244b5220 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cbbd8497cf..6399c72cfb 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.23.0 +// sqlc v1.30.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 67224ec65c..b177d0f16c 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 6f687d337d..8a66a8cf24 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Num int32 } 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 64c904eb14..c3215c16c3 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 6f687d337d..8a66a8cf24 100644 --- a/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Num int32 } 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 64c904eb14..c3215c16c3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 6f687d337d..8a66a8cf24 100644 --- a/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go +++ b/internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Num int32 } 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 47dcca702f..22bc5eedce 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 474b61d44f..6e9823127b 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.23.0 +// sqlc v1.30.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 b87508995a..5366bac847 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 504c035243..ec1cb8d670 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.23.0 +// sqlc v1.30.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 ad61949938..eec817e3eb 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 df8da3d5aa..ec9de5f49c 100644 --- a/internal/endtoend/testdata/mix_param_types/mysql/go/models.go +++ b/internal/endtoend/testdata/mix_param_types/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 Name string 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 f8a3b287ff..5b7a32b9bd 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.23.0 +// sqlc v1.30.0 // source: test.sql package querytest diff --git a/internal/endtoend/testdata/mix_param_types/mysql/schema.sql b/internal/endtoend/testdata/mix_param_types/mysql/schema.sql new file mode 100644 index 0000000000..b515bf8d04 --- /dev/null +++ b/internal/endtoend/testdata/mix_param_types/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE bar ( + id serial not null, + name text not null, + phone text not null +); diff --git a/internal/endtoend/testdata/mix_param_types/mysql/sqlc.json b/internal/endtoend/testdata/mix_param_types/mysql/sqlc.json index 145f64ba3f..3e8d09d00d 100644 --- a/internal/endtoend/testdata/mix_param_types/mysql/sqlc.json +++ b/internal/endtoend/testdata/mix_param_types/mysql/sqlc.json @@ -4,7 +4,7 @@ { "path": "go", "name": "querytest", - "schema": "test.sql", + "schema": "schema.sql", "queries": "test.sql", "engine": "mysql" } diff --git a/internal/endtoend/testdata/mix_param_types/mysql/test.sql b/internal/endtoend/testdata/mix_param_types/mysql/test.sql index b624d3e2ea..e23f1dcb70 100644 --- a/internal/endtoend/testdata/mix_param_types/mysql/test.sql +++ b/internal/endtoend/testdata/mix_param_types/mysql/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 <> ?; 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 062e3fcb52..2f0803b319 100644 --- a/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go +++ b/internal/endtoend/testdata/mix_param_types/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 Name string 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 7668fdefe9..be9a12710b 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 37e4cc96f0..8c3cca3813 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Tags [][]string } 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 f561e32c0b..62e96a3e2f 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 37e4cc96f0..8c3cca3813 100644 --- a/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Tags [][]string } 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 f561e32c0b..62e96a3e2f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 37e4cc96f0..8c3cca3813 100644 --- a/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go +++ b/internal/endtoend/testdata/multidimension_array/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { Tags [][]string } 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 ec3310e72a..67d3ebc82e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 99bd0dd9e3..8594c6e575 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.23.0 +// sqlc v1.30.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 926a1f11de..ed5475c882 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 6176979151..c7e5e6a8d0 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.23.0 +// sqlc v1.30.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 926a1f11de..ed5475c882 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/multischema/stdlib/go/models.go b/internal/endtoend/testdata/multischema/stdlib/go/models.go index 99bd0dd9e3..8594c6e575 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.23.0 +// sqlc v1.30.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 84cc499047..3d3efab77e 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/mysql_default_value/mysql/go/db.go b/internal/endtoend/testdata/mysql_default_value/mysql/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/mysql_default_value/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/mysql_default_value/mysql/go/models.go b/internal/endtoend/testdata/mysql_default_value/mysql/go/models.go new file mode 100644 index 0000000000..2db334d743 --- /dev/null +++ b/internal/endtoend/testdata/mysql_default_value/mysql/go/models.go @@ -0,0 +1,12 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type Author struct { + ID int32 + Name string + Bio string + Explanation string +} diff --git a/internal/endtoend/testdata/mysql_default_value/mysql/go/query.sql.go b/internal/endtoend/testdata/mysql_default_value/mysql/go/query.sql.go new file mode 100644 index 0000000000..2b59679ee3 --- /dev/null +++ b/internal/endtoend/testdata/mysql_default_value/mysql/go/query.sql.go @@ -0,0 +1,42 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const selectAuthor = `-- name: SelectAuthor :many +SELECT id, name, bio, explanation FROM authors +` + +func (q *Queries) SelectAuthor(ctx context.Context) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, selectAuthor) + 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.Explanation, + ); 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/mysql_default_value/mysql/query.sql b/internal/endtoend/testdata/mysql_default_value/mysql/query.sql new file mode 100644 index 0000000000..00b1f3c460 --- /dev/null +++ b/internal/endtoend/testdata/mysql_default_value/mysql/query.sql @@ -0,0 +1,2 @@ +-- name: SelectAuthor :many +SELECT * FROM authors; diff --git a/internal/endtoend/testdata/mysql_default_value/mysql/schema.sql b/internal/endtoend/testdata/mysql_default_value/mysql/schema.sql new file mode 100644 index 0000000000..be6634420d --- /dev/null +++ b/internal/endtoend/testdata/mysql_default_value/mysql/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE authors ( + id INT PRIMARY KEY, + name text NOT NULL, + bio text NOT NULL +); + +ALTER TABLE authors ADD COLUMN explanation text NOT NULL DEFAULT (''); diff --git a/internal/endtoend/testdata/mysql_default_value/mysql/sqlc.json b/internal/endtoend/testdata/mysql_default_value/mysql/sqlc.json new file mode 100644 index 0000000000..7dabfeef72 --- /dev/null +++ b/internal/endtoend/testdata/mysql_default_value/mysql/sqlc.json @@ -0,0 +1,14 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "sql_package": "database/sql", + "sql_driver": "github.com/go-sql-driver/mysql", + "engine": "mysql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} 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 d95cae904d..ddfc73984f 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.23.0 +// sqlc v1.30.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 ef8f3bc074..9e1e338714 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.23.0 +// sqlc v1.30.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 0ca4f71687..06e67d8176 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.23.0 +// sqlc v1.30.0 package aggregate_functions @@ -10,5 +10,5 @@ import ( type Student struct { StudentName sql.NullString - Score sql.NullFloat64 + TestScore sql.NullFloat64 } diff --git a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/group_concat.sql b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/group_concat.sql index f1858e42fd..443253851d 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/group_concat.sql +++ b/internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/group_concat.sql @@ -1,8 +1,3 @@ -CREATE TABLE student ( - student_name VARCHAR(255), - score DOUBLE -); - -- name: GroupConcat :many SELECT student_name, GROUP_CONCAT(test_score) FROM student 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 b07935fa19..9bc096b936 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.23.0 +// sqlc v1.30.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 39610d13ea..377778fa75 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.23.0 +// sqlc v1.30.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 444caaed7e..9606d2d4af 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.23.0 +// sqlc v1.30.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 09a76bfdf6..9cda7d328c 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,7 +1,14 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package date_and_time_functions -import () +import ( + "database/sql" +) + +type Student struct { + StudentName sql.NullString + TestScore sql.NullFloat64 +} diff --git a/internal/endtoend/testdata/mysql_reference_manual/schema.sql b/internal/endtoend/testdata/mysql_reference_manual/schema.sql new file mode 100644 index 0000000000..5dcef48427 --- /dev/null +++ b/internal/endtoend/testdata/mysql_reference_manual/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE student ( + student_name VARCHAR(255), + test_score DOUBLE +); diff --git a/internal/endtoend/testdata/mysql_reference_manual/sqlc.json b/internal/endtoend/testdata/mysql_reference_manual/sqlc.json index 26e8643999..71c8ff5aa8 100644 --- a/internal/endtoend/testdata/mysql_reference_manual/sqlc.json +++ b/internal/endtoend/testdata/mysql_reference_manual/sqlc.json @@ -4,14 +4,14 @@ { "name": "date_and_time_functions", "path": "date_and_time_functions/go", - "schema": "date_and_time_functions", + "schema": "schema.sql", "queries": "date_and_time_functions", "engine": "mysql" }, { "name": "aggregate_functions", "path": "aggregate_functions/go", - "schema": "aggregate_functions", + "schema": "schema.sql", "queries": "aggregate_functions", "engine": "mysql" } diff --git a/internal/endtoend/testdata/mysql_vector/mysql/go/db.go b/internal/endtoend/testdata/mysql_vector/mysql/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/mysql_vector/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/mysql_vector/mysql/go/models.go b/internal/endtoend/testdata/mysql_vector/mysql/go/models.go new file mode 100644 index 0000000000..d0a2f2e91d --- /dev/null +++ b/internal/endtoend/testdata/mysql_vector/mysql/go/models.go @@ -0,0 +1,10 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type Foo struct { + ID int32 + Embedding interface{} +} diff --git a/internal/endtoend/testdata/mysql_vector/mysql/go/query.sql.go b/internal/endtoend/testdata/mysql_vector/mysql/go/query.sql.go new file mode 100644 index 0000000000..8ac54a83c4 --- /dev/null +++ b/internal/endtoend/testdata/mysql_vector/mysql/go/query.sql.go @@ -0,0 +1,48 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const insertVector = `-- name: InsertVector :exec +INSERT INTO foo(embedding) VALUES (STRING_TO_VECTOR('[0.1, 0.2, 0.3, 0.4]')) +` + +func (q *Queries) InsertVector(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, insertVector) + return err +} + +const selectVector = `-- name: SelectVector :many +SELECT id FROM foo +ORDER BY DISTANCE(STRING_TO_VECTOR('[1.2, 3.4, 5.6]'), embedding, 'L2_squared') +LIMIT 10 +` + +func (q *Queries) SelectVector(ctx context.Context) ([]int32, error) { + rows, err := q.db.QueryContext(ctx, selectVector) + if err != nil { + return nil, err + } + defer rows.Close() + var items []int32 + for rows.Next() { + var id int32 + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + 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/mysql_vector/mysql/query.sql b/internal/endtoend/testdata/mysql_vector/mysql/query.sql new file mode 100644 index 0000000000..358d69129f --- /dev/null +++ b/internal/endtoend/testdata/mysql_vector/mysql/query.sql @@ -0,0 +1,7 @@ +-- name: InsertVector :exec +INSERT INTO foo(embedding) VALUES (STRING_TO_VECTOR('[0.1, 0.2, 0.3, 0.4]')); + +-- name: SelectVector :many +SELECT id FROM foo +ORDER BY DISTANCE(STRING_TO_VECTOR('[1.2, 3.4, 5.6]'), embedding, 'L2_squared') +LIMIT 10; diff --git a/internal/endtoend/testdata/mysql_vector/mysql/schema.sql b/internal/endtoend/testdata/mysql_vector/mysql/schema.sql new file mode 100644 index 0000000000..da61ac5682 --- /dev/null +++ b/internal/endtoend/testdata/mysql_vector/mysql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE foo( + id INT PRIMARY KEY auto_increment, + embedding VECTOR(4) +); diff --git a/internal/endtoend/testdata/mysql_vector/mysql/sqlc.json b/internal/endtoend/testdata/mysql_vector/mysql/sqlc.json new file mode 100644 index 0000000000..7dabfeef72 --- /dev/null +++ b/internal/endtoend/testdata/mysql_vector/mysql/sqlc.json @@ -0,0 +1,14 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "sql_package": "database/sql", + "sql_driver": "github.com/go-sql-driver/mysql", + "engine": "mysql", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 9ad4b22fad..7d01ec0654 100644 --- a/internal/endtoend/testdata/named_param/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/named_param/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Bio string 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 348bb85cc6..a6e9fe3018 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9ad4b22fad..7d01ec0654 100644 --- a/internal/endtoend/testdata/named_param/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/named_param/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Bio string 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 348bb85cc6..a6e9fe3018 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9ad4b22fad..7d01ec0654 100644 --- a/internal/endtoend/testdata/named_param/sqlite/go/models.go +++ b/internal/endtoend/testdata/named_param/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Bio string 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 d79c8fcc48..f08b57bc1d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9ad4b22fad..7d01ec0654 100644 --- a/internal/endtoend/testdata/named_param/stdlib/go/models.go +++ b/internal/endtoend/testdata/named_param/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Bio string 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 28a56b08a1..0d66297a35 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 4621a2ef92..b3f22ae1ba 100644 --- a/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Test struct { ID int64 UpdateTime 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 index 46ff594825..06698dbad4 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/nextval/postgresql/go/models.go b/internal/endtoend/testdata/nextval/postgresql/go/models.go index 135e4da987..c48d0a0de2 100644 --- a/internal/endtoend/testdata/nextval/postgresql/go/models.go +++ b/internal/endtoend/testdata/nextval/postgresql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Author struct { ID int64 } diff --git a/internal/endtoend/testdata/nextval/postgresql/go/query.sql.go b/internal/endtoend/testdata/nextval/postgresql/go/query.sql.go index 7ef858f410..6ea5eba838 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 3bd1b70434..c2f9fa6a26 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 2aeaaae2f4..8074a524af 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 31e850dc27..4256706b67 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 2aeaaae2f4..8074a524af 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index f749f9f6ca..f22d8f38bf 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/omit_sqlc_version/db/db.go b/internal/endtoend/testdata/omit_sqlc_version/db/db.go new file mode 100644 index 0000000000..c3c034ae37 --- /dev/null +++ b/internal/endtoend/testdata/omit_sqlc_version/db/db.go @@ -0,0 +1,29 @@ +// Code generated by sqlc. DO NOT EDIT. + +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/omit_sqlc_version/db/models.go b/internal/endtoend/testdata/omit_sqlc_version/db/models.go new file mode 100644 index 0000000000..3bc48237ef --- /dev/null +++ b/internal/endtoend/testdata/omit_sqlc_version/db/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. + +package db + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/omit_sqlc_version/db/query.sql.go b/internal/endtoend/testdata/omit_sqlc_version/db/query.sql.go new file mode 100644 index 0000000000..147cb4b15c --- /dev/null +++ b/internal/endtoend/testdata/omit_sqlc_version/db/query.sql.go @@ -0,0 +1,80 @@ +// Code generated by sqlc. DO NOT EDIT. +// source: query.sql + +package db + +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/omit_sqlc_version/query.sql b/internal/endtoend/testdata/omit_sqlc_version/query.sql new file mode 100644 index 0000000000..971b8f902d --- /dev/null +++ b/internal/endtoend/testdata/omit_sqlc_version/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/omit_sqlc_version/schema.sql b/internal/endtoend/testdata/omit_sqlc_version/schema.sql new file mode 100644 index 0000000000..69b607d902 --- /dev/null +++ b/internal/endtoend/testdata/omit_sqlc_version/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/omit_sqlc_version/sqlc.json b/internal/endtoend/testdata/omit_sqlc_version/sqlc.json new file mode 100644 index 0000000000..f86d2b7b9d --- /dev/null +++ b/internal/endtoend/testdata/omit_sqlc_version/sqlc.json @@ -0,0 +1,15 @@ +{ + "version": "2", + "sql": [{ + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "gen": { + "go": { + "out": "db", + "omit_sqlc_version": true + } + } + }] +} + 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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 70f954c80b..4f415e7078 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.23.0 +// sqlc v1.30.0 package db @@ -9,6 +9,48 @@ import ( "fmt" ) +type ArrayEnum string + +const ( + ArrayEnumO ArrayEnum = "o" + ArrayEnumP ArrayEnum = "p" +) + +func (e *ArrayEnum) Scan(src interface{}) error { + switch s := src.(type) { + case []byte: + *e = ArrayEnum(s) + case string: + *e = ArrayEnum(s) + default: + return fmt.Errorf("unsupported scan type for ArrayEnum: %T", src) + } + return nil +} + +type NullArrayEnum struct { + ArrayEnum ArrayEnum + Valid bool // Valid is true if ArrayEnum is not NULL +} + +// Scan implements the Scanner interface. +func (ns *NullArrayEnum) Scan(value interface{}) error { + if value == nil { + ns.ArrayEnum, ns.Valid = "", false + return nil + } + ns.Valid = true + return ns.ArrayEnum.Scan(value) +} + +// Value implements the driver Valuer interface. +func (ns NullArrayEnum) Value() (driver.Value, error) { + if !ns.Valid { + return nil, nil + } + return string(ns.ArrayEnum), nil +} + type QueryParamEnumTableEnum string const ( @@ -261,6 +303,11 @@ func (ns NullQuerySqlcEmbedEnum) Value() (driver.Value, error) { return string(ns.QuerySqlcEmbedEnum), nil } +type ArrayEnumTable struct { + ID int32 + Value []ArrayEnum +} + type QueryParamEnumTable struct { ID int32 Other QueryParamEnumTableEnum 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 1a96a9d84e..ac93669dd0 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.23.0 +// sqlc v1.30.0 // source: query.sql package db @@ -8,8 +8,37 @@ package db import ( "context" "database/sql" + + "github.com/lib/pq" ) +const query_enum_array_table = `-- name: query_enum_array_table :many +SELECT id, value FROM array_enum_table +` + +func (q *Queries) query_enum_array_table(ctx context.Context) ([]ArrayEnumTable, error) { + rows, err := q.db.QueryContext(ctx, query_enum_array_table) + if err != nil { + return nil, err + } + defer rows.Close() + var items []ArrayEnumTable + for rows.Next() { + var i ArrayEnumTable + if err := rows.Scan(&i.ID, pq.Array(&i.Value)); 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 query_param_enum_table = `-- name: query_param_enum_table :one SELECT id, other, value FROM query_param_enum_table WHERE value = $1 ` 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 599a227482..60104c8e9d 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql @@ -15,3 +15,6 @@ 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; + +-- name: query_enum_array_table :many +SELECT * FROM array_enum_table; 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 486119c334..4ce59218b6 100644 --- a/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql @@ -58,4 +58,12 @@ CREATE TYPE query_sqlc_embed_enum AS ENUM ( CREATE TABLE query_sqlc_embed_table ( id INTEGER PRIMARY KEY, value query_sqlc_embed_enum -) +); + +CREATE TYPE array_enum AS ENUM ( + 'o', 'p' +); +CREATE TABLE array_enum_table ( + id INTEGER PRIMARY KEY, + value array_enum[] +); 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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 d3e56d7d47..5041799d54 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.23.0 +// sqlc v1.30.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 5dbb7e33a6..367c21685e 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 d3e56d7d47..5041799d54 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.23.0 +// sqlc v1.30.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 19f37e7af0..8fd1d5c050 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 46f9b56216..fe6b295344 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Demo struct { Txt string } 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 987ba20fd7..9888f6ea6e 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 46f9b56216..fe6b295344 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Demo struct { Txt string } 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 987ba20fd7..9888f6ea6e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 46f9b56216..fe6b295344 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Demo struct { Txt string } 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 a718794adf..666e58b093 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 bf2757e632..eaf05e5c00 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.23.0 +// sqlc v1.30.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 74a3f96462..7163ee84fa 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -43,6 +43,34 @@ func (q *Queries) ListAuthorsColumnSort(ctx context.Context, arg ListAuthorsColu return items, nil } +const listAuthorsColumnSortFnWtihArg = `-- name: ListAuthorsColumnSortFnWtihArg :many +SELECT id, name, bio FROM authors +ORDER BY MOD(id, ?) +` + +func (q *Queries) ListAuthorsColumnSortFnWtihArg(ctx context.Context, modArg int64) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthorsColumnSortFnWtihArg, modArg) + 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 > ? diff --git a/internal/endtoend/testdata/order_by_binds/mysql/query.sql b/internal/endtoend/testdata/order_by_binds/mysql/query.sql index e662d8f06a..c43763c838 100644 --- a/internal/endtoend/testdata/order_by_binds/mysql/query.sql +++ b/internal/endtoend/testdata/order_by_binds/mysql/query.sql @@ -3,6 +3,10 @@ SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY CASE WHEN sqlc.arg(sort_column) = 'name' THEN name END; +-- name: ListAuthorsColumnSortFnWtihArg :many +SELECT * FROM authors +ORDER BY MOD(id, sqlc.arg(mod_arg)); + -- name: ListAuthorsNameSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 bf2757e632..eaf05e5c00 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.23.0 +// sqlc v1.30.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 e20738a76b..5c98fff301 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 bf2757e632..eaf05e5c00 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.23.0 +// sqlc v1.30.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 d3c036a47e..fcf89ac330 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -43,6 +43,34 @@ func (q *Queries) ListAuthorsColumnSort(ctx context.Context, arg ListAuthorsColu return items, nil } +const listAuthorsColumnSortFnWtihArg = `-- name: ListAuthorsColumnSortFnWtihArg :many +SELECT id, name, bio FROM authors +ORDER BY MOD(id, $1) +` + +func (q *Queries) ListAuthorsColumnSortFnWtihArg(ctx context.Context, mod int64) ([]Author, error) { + rows, err := q.db.QueryContext(ctx, listAuthorsColumnSortFnWtihArg, mod) + 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 diff --git a/internal/endtoend/testdata/order_by_binds/postgresql/query.sql b/internal/endtoend/testdata/order_by_binds/postgresql/query.sql index e662d8f06a..961d3f4e71 100644 --- a/internal/endtoend/testdata/order_by_binds/postgresql/query.sql +++ b/internal/endtoend/testdata/order_by_binds/postgresql/query.sql @@ -3,6 +3,10 @@ SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY CASE WHEN sqlc.arg(sort_column) = 'name' THEN name END; +-- name: ListAuthorsColumnSortFnWtihArg :many +SELECT * FROM authors +ORDER BY MOD(id, $1); + -- name: ListAuthorsNameSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 287f482f03..d0c134974d 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.23.0 +// sqlc v1.30.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 936b3810a0..dc796d7d62 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 5056b7b477..18e0bf75dc 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.23.0 +// sqlc v1.30.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 936b3810a0..dc796d7d62 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.23.0 +// sqlc v1.30.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 158d740dbf..a3d8e17818 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.23.0 +// sqlc v1.30.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 71a2b6c002..9481f2fc5e 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.23.0 +// sqlc v1.30.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 e502f2e497..8149ab98c1 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 fe2fb2a86d..0fba399be7 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.23.0 +// sqlc v1.30.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 952c3860ad..4debf38e23 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.23.0 +// sqlc v1.30.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 fc03b23638..a59e22a66c 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.23.0 +// sqlc v1.30.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 71a2b6c002..9481f2fc5e 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.23.0 +// sqlc v1.30.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 7d1a761e33..32b197ce0c 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 fe2fb2a86d..0fba399be7 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.23.0 +// sqlc v1.30.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 952c3860ad..4debf38e23 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 1f7b4db6e8..8008c65e53 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.23.0 +// sqlc v1.30.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 53ecb88bf3..fc2d9b248e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 952c3860ad..4debf38e23 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 952c3860ad..4debf38e23 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 100644 --- a/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go +++ b/internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 53ecb88bf3..fc2d9b248e 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.23.0 +// sqlc v1.30.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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/mysql/go/models.go b/internal/endtoend/testdata/overrides/mysql/go/models.go index 27687f992d..e6ba74a5a0 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/mysql/go/query.sql.go b/internal/endtoend/testdata/overrides/mysql/go/query.sql.go new file mode 100644 index 0000000000..0faba2cde4 --- /dev/null +++ b/internal/endtoend/testdata/overrides/mysql/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides/mysql/query.sql b/internal/endtoend/testdata/overrides/mysql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides/mysql/query.sql +++ b/internal/endtoend/testdata/overrides/mysql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; 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 447c41a4d1..d27a158d73 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.23.0 +// sqlc v1.30.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 b2ce59363f..051e7672e0 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..6d31e7480e --- /dev/null +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v4/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; 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 43ae09184a..a6e06f5d0e 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.23.0 +// sqlc v1.30.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 b2ce59363f..051e7672e0 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..6d31e7480e --- /dev/null +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/overrides/postgresql/pgx/v5/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go index d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 b2ce59363f..051e7672e0 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..0faba2cde4 --- /dev/null +++ b/internal/endtoend/testdata/overrides/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides/postgresql/stdlib/query.sql b/internal/endtoend/testdata/overrides/postgresql/stdlib/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/overrides/postgresql/stdlib/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides/sqlite/go/db.go b/internal/endtoend/testdata/overrides/sqlite/go/db.go index d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/sqlite/go/models.go b/internal/endtoend/testdata/overrides/sqlite/go/models.go index 27687f992d..e6ba74a5a0 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides/sqlite/go/query.sql.go b/internal/endtoend/testdata/overrides/sqlite/go/query.sql.go new file mode 100644 index 0000000000..e528f151d9 --- /dev/null +++ b/internal/endtoend/testdata/overrides/sqlite/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int64 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides/sqlite/query.sql b/internal/endtoend/testdata/overrides/sqlite/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides/sqlite/query.sql +++ b/internal/endtoend/testdata/overrides/sqlite/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; 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 448655c68f..00b551ba76 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.23.0 +// sqlc v1.30.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 37e8a1249c..c97fe5b642 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.23.0 +// sqlc v1.30.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 1d85678e01..0fdeaad6e5 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.23.0 +// sqlc v1.30.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 167e60e398..fed4c7f269 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.23.0 +// sqlc v1.30.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 647f992c95..876b5683f2 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.23.0 +// sqlc v1.30.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 1d85678e01..0fdeaad6e5 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.23.0 +// sqlc v1.30.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 69935c9595..eaae6e5461 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.23.0 +// sqlc v1.30.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 37e8a1249c..c97fe5b642 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.23.0 +// sqlc v1.30.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 5125b6ce2e..f6f04988a4 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.23.0 +// sqlc v1.30.0 // source: query.sql package query diff --git a/internal/endtoend/testdata/overrides_config/query.sql b/internal/endtoend/testdata/overrides_config/query.sql new file mode 100644 index 0000000000..9da604b57e --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/query.sql @@ -0,0 +1,2 @@ +-- name: Test :one +SELECT 1; diff --git a/internal/endtoend/testdata/overrides_config/schema.sql b/internal/endtoend/testdata/overrides_config/schema.sql new file mode 100644 index 0000000000..03d90e1cec --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE overrides ( + one text NOT NULL, + two bigint NOT NULL, + three text[] NOT NULL, + four bytea NOT NULL, + five text[] +); diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/db.go b/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/overrides_config/v2/yaml/global/db/models.go b/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/models.go new file mode 100644 index 0000000000..48fa1bcf32 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/models.go @@ -0,0 +1,17 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "github.com/sqlc-dev/sqlc-testdata/pkg" +) + +type Override struct { + ONE pkg.CustomType + Two int64 + Three pkg.CustomType + Four []byte + Five []pkg.CustomType +} diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/query.sql.go b/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/query.sql.go new file mode 100644 index 0000000000..915a614950 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global/db/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/global/sqlc.yaml b/internal/endtoend/testdata/overrides_config/v2/yaml/global/sqlc.yaml new file mode 100644 index 0000000000..335759cfd2 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global/sqlc.yaml @@ -0,0 +1,19 @@ +version: "2" +overrides: + go: + rename: + one: "ONE" + overrides: + - db_type: "text" + go_type: "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType" + - column: "overrides.three" + go_type: + import: "github.com/sqlc-dev/sqlc-testdata/pkg" + type: "CustomType" +sql: +- schema: "../../../schema.sql" + queries: "../../../query.sql" + engine: "postgresql" + gen: + go: + out: "db" diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/db.go b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/overrides_config/v2/yaml/global_and_queryset/db/models.go b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/models.go new file mode 100644 index 0000000000..48fa1bcf32 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/models.go @@ -0,0 +1,17 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "github.com/sqlc-dev/sqlc-testdata/pkg" +) + +type Override struct { + ONE pkg.CustomType + Two int64 + Three pkg.CustomType + Four []byte + Five []pkg.CustomType +} diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/query.sql.go b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/query.sql.go new file mode 100644 index 0000000000..915a614950 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/sqlc.yaml b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/sqlc.yaml new file mode 100644 index 0000000000..62ef7e7772 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/sqlc.yaml @@ -0,0 +1,26 @@ +version: "2" +overrides: + go: + rename: + one: "ONE" + overrides: + - db_type: "text" + go_type: "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType" + - column: "overrides.three" + go_type: + import: "github.com/sqlc-dev/sqlc-testdata/pkg" + type: "CustomType" +sql: +- schema: "../../../schema.sql" + queries: "../../../query.sql" + engine: "postgresql" + gen: + go: + out: "db" + rename: + one: "ONE" + overrides: + - column: "overrides.three" + go_type: + import: "invalid/import" + type: "ShouldNotSeeThis" diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/db.go b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/overrides_config/v2/yaml/queryset/db/models.go b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/models.go new file mode 100644 index 0000000000..48fa1bcf32 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/models.go @@ -0,0 +1,17 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "github.com/sqlc-dev/sqlc-testdata/pkg" +) + +type Override struct { + ONE pkg.CustomType + Two int64 + Three pkg.CustomType + Four []byte + Five []pkg.CustomType +} diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/query.sql.go b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/query.sql.go new file mode 100644 index 0000000000..915a614950 --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/sqlc.yaml b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/sqlc.yaml new file mode 100644 index 0000000000..7847f6d08d --- /dev/null +++ b/internal/endtoend/testdata/overrides_config/v2/yaml/queryset/sqlc.yaml @@ -0,0 +1,17 @@ +version: "2" +sql: +- schema: "../../../schema.sql" + queries: "../../../query.sql" + engine: "postgresql" + gen: + go: + out: "db" + rename: + one: "ONE" + overrides: + - db_type: "text" + go_type: "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType" + - column: "overrides.three" + go_type: + import: "github.com/sqlc-dev/sqlc-testdata/pkg" + type: "CustomType" diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/query.sql b/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/query.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/stderr.txt b/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/stderr.txt index cb6fb84aec..c6891c182b 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/stderr.txt +++ b/internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/stderr.txt @@ -1 +1,2 @@ -error parsing sqlc.json: bad syntax for struct tag pair +# package override +error generating code: bad syntax for struct tag pair 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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 166ada239a..b7b7849db3 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,22 +1,21 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package override -import () - type Bar struct { - Other string - AlsoTagged string `also:"tagged"` + Other string `utype:"notnull_text"` + AlsoTagged string `also:"tagged" utype:"notnull_text"` } type Baz struct { - Other string - AlsoTagged string `also:"tagged"` + Other string `utype:"notnull_text"` + AlsoTagged string `also:"tagged" utype:"notnull_text"` } type Foo struct { - Other string - Tagged string `a:"b" x:"y,z"` + Other string `utype:"notnull_text"` + Tagged string `a:"b" utype:"notnull_text" x:"y,z"` + Nulltext string `utype:"nullable_text"` } diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/query.sql.go b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/query.sql.go new file mode 100644 index 0000000000..0faba2cde4 --- /dev/null +++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/query.sql b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/query.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/schema.sql b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/schema.sql index 4d5233cc37..5c9ce85545 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/schema.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/schema.sql @@ -1,6 +1,7 @@ CREATE TABLE foo ( other text NOT NULL, - tagged text NOT NULL + tagged text NOT NULL, + nulltext text ); CREATE TABLE bar ( diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/sqlc.json b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/sqlc.json index 7d92e65e69..697fe054ea 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/mysql/sqlc.json +++ b/internal/endtoend/testdata/overrides_go_struct_tags/mysql/sqlc.json @@ -15,6 +15,16 @@ { "go_struct_tag": "also:\"tagged\"", "column": "*.also_tagged" + }, + { + "db_type": "text", + "go_struct_tag": "utype:\"notnull_text\"" + }, + { + "db_type": "text", + "go_type": "string", + "nullable": true, + "go_struct_tag": "utype:\"nullable_text\"" } ] } 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 447c41a4d1..d27a158d73 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.23.0 +// sqlc v1.30.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 74b276d169..1a9a939e64 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,23 +1,20 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package override -import ( - "database/sql" -) - type Bar struct { - ID sql.NullString `type:"id"` - OtherID sql.NullString `type:"other_id"` - About sql.NullString - Other sql.NullString `type:"other"` + ID string `type:"id" utype:"nullable_text"` + OtherID string `type:"other_id" utype:"nullable_text"` + About string `utype:"nullable_text"` + Other string `type:"other" utype:"nullable_text"` } type Foo struct { - ID sql.NullString `source:"foo" type:"id"` - OtherID sql.NullString `type:"other_id"` - About sql.NullString `type:"about"` - Other sql.NullString `type:"this"` + ID string `source:"foo" type:"id" utype:"nullable_text"` + OtherID string `type:"other_id" utype:"nullable_text"` + About string `type:"about" utype:"nullable_text"` + Other string `type:"this" utype:"nullable_text"` + Notnulltext string `utype:"notnull_text"` } diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/query.sql.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/query.sql.go new file mode 100644 index 0000000000..6d31e7480e --- /dev/null +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/query.sql b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/query.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/schema.sql b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/schema.sql index 53739ddbb1..30b718298d 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/schema.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/schema.sql @@ -2,7 +2,8 @@ CREATE TABLE foo ( id text, other_id text, about text, - other text + other text, + notnulltext text not null ); CREATE TABLE bar ( diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/sqlc.json b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/sqlc.json index a01427c202..bc583cdad4 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/sqlc.json +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/sqlc.json @@ -32,6 +32,16 @@ { "column": "foo.other", "go_struct_tag": "type:\"this\"" + }, + { + "db_type": "text", + "go_struct_tag": "utype:\"notnull_text\"" + }, + { + "db_type": "text", + "go_type": "string", + "nullable": true, + "go_struct_tag": "utype:\"nullable_text\"" } ] } 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 43ae09184a..a6e06f5d0e 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.23.0 +// sqlc v1.30.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 025850bdab..1a9a939e64 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,23 +1,20 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package override -import ( - "github.com/jackc/pgx/v5/pgtype" -) - type Bar struct { - ID pgtype.Text `type:"id"` - OtherID pgtype.Text `type:"other_id"` - About pgtype.Text - Other pgtype.Text `type:"other"` + ID string `type:"id" utype:"nullable_text"` + OtherID string `type:"other_id" utype:"nullable_text"` + About string `utype:"nullable_text"` + Other string `type:"other" utype:"nullable_text"` } type Foo struct { - ID pgtype.Text `source:"foo" type:"id"` - OtherID pgtype.Text `type:"other_id"` - About pgtype.Text `type:"about"` - Other pgtype.Text `type:"this"` + ID string `source:"foo" type:"id" utype:"nullable_text"` + OtherID string `type:"other_id" utype:"nullable_text"` + About string `type:"about" utype:"nullable_text"` + Other string `type:"this" utype:"nullable_text"` + Notnulltext string `utype:"notnull_text"` } diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/query.sql.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/query.sql.go new file mode 100644 index 0000000000..6d31e7480e --- /dev/null +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRow(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/query.sql b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/query.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/schema.sql b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/schema.sql index 53739ddbb1..30b718298d 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/schema.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/schema.sql @@ -2,7 +2,8 @@ CREATE TABLE foo ( id text, other_id text, about text, - other text + other text, + notnulltext text not null ); CREATE TABLE bar ( diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/sqlc.json b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/sqlc.json index da86badcc7..df8c9de3b0 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/sqlc.json +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/sqlc.json @@ -32,6 +32,16 @@ { "column": "foo.other", "go_struct_tag": "type:\"this\"" + }, + { + "db_type": "text", + "go_struct_tag": "utype:\"notnull_text\"" + }, + { + "db_type": "text", + "go_type": "string", + "nullable": true, + "go_struct_tag": "utype:\"nullable_text\"" } ] } 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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 0d2088ff55..e47d67ca03 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,14 +1,11 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package override -import ( - "database/sql" -) - type Foo struct { - ID sql.NullString `x:"y"` - OtherID sql.NullString + ID string `utype:"nullable_text" x:"y"` + OtherID string `utype:"nullable_text"` + Notnulltext string `utype:"notnull_text"` } diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/query.sql.go b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/query.sql.go new file mode 100644 index 0000000000..0faba2cde4 --- /dev/null +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/query.sql b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/query.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/schema.sql index f860a58030..82698ec836 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/schema.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/schema.sql @@ -1,4 +1,5 @@ CREATE TABLE foo ( id text, - other_id text + other_id text, + notnulltext text not null ); diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/sqlc.json b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/sqlc.json index 2c6f9e8c7c..f1171fcc11 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/sqlc.json +++ b/internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/sqlc.json @@ -11,6 +11,16 @@ { "column": "foo.id", "go_struct_tag": "x:\"y\"" + }, + { + "db_type": "text", + "go_struct_tag": "utype:\"notnull_text\"" + }, + { + "db_type": "text", + "go_type": "string", + "nullable": true, + "go_struct_tag": "utype:\"nullable_text\"" } ] } 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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 9a9c5460ee..72940ae47d 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,25 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package override -import () - type Bar struct { - Other string - AlsoTagged string `also:"tagged"` - Tag3 string `tag_with_space:" it's legal!"` + Other string `utype:"notnull_text"` + AlsoTagged string `also:"tagged" utype:"notnull_text"` + Tag3 string `tag_with_space:" it's legal!" utype:"notnull_text"` } type Baz struct { - Other string - AlsoTagged string `also:"tagged"` - Tag3 string `tag_with_space:" it's legal!"` + Other string `utype:"notnull_text"` + AlsoTagged string `also:"tagged" utype:"notnull_text"` + Tag3 string `tag_with_space:" it's legal!" utype:"notnull_text"` } type Foo struct { - Other string - Tagged string `a:"b" x:"y,z"` - Tag3 string `tag_with_space:" it's legal!"` + Other string `utype:"notnull_text"` + Tagged string `a:"b" utype:"notnull_text" x:"y,z"` + Tag3 string `tag_with_space:" it's legal!" utype:"notnull_text"` + Nulltext string `utype:"nullable_text"` } diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/query.sql.go b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/query.sql.go new file mode 100644 index 0000000000..e528f151d9 --- /dev/null +++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int64 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/query.sql b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/query.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/schema.sql b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/schema.sql index f908060db1..e9aa9bd37a 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/schema.sql +++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/schema.sql @@ -1,7 +1,8 @@ CREATE TABLE foo ( other text NOT NULL, tagged text NOT NULL, - tag3 text NOT NULL + tag3 text NOT NULL, + nulltext text ); CREATE TABLE bar ( diff --git a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/sqlc.json b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/sqlc.json index a4d54cc3df..a4ca853b6a 100644 --- a/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/sqlc.json +++ b/internal/endtoend/testdata/overrides_go_struct_tags/sqlite/sqlc.json @@ -19,6 +19,16 @@ { "go_struct_tag": "tag_with_space:\" it's legal!\"", "column": "*.tag3" + }, + { + "db_type": "text", + "go_struct_tag": "utype:\"notnull_text\"" + }, + { + "db_type": "text", + "go_type": "string", + "nullable": true, + "go_struct_tag": "utype:\"nullable_text\"" } ] } 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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 2cf28b484b..ba5ce329c7 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.23.0 +// sqlc v1.30.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 c4253cd64a..b34ccf09bd 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.23.0 +// sqlc v1.30.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 447c41a4d1..d27a158d73 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.23.0 +// sqlc v1.30.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 c9347dfe39..2a8281a55b 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.23.0 +// sqlc v1.30.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 7e6c3c54b5..3f162a8688 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.23.0 +// sqlc v1.30.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 43ae09184a..a6e06f5d0e 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.23.0 +// sqlc v1.30.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 634bb7734a..5e19a83381 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.23.0 +// sqlc v1.30.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 c1298a27b7..69124af2d6 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.23.0 +// sqlc v1.30.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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 21c4453e51..e86b5539c9 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.23.0 +// sqlc v1.30.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 ae4b547e54..d73caecead 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.23.0 +// sqlc v1.30.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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 2cf28b484b..ba5ce329c7 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/overrides_go_types/sqlite/go/query.sql.go b/internal/endtoend/testdata/overrides_go_types/sqlite/go/query.sql.go new file mode 100644 index 0000000000..e528f151d9 --- /dev/null +++ b/internal/endtoend/testdata/overrides_go_types/sqlite/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int64, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int64 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/overrides_go_types/sqlite/query.sql b/internal/endtoend/testdata/overrides_go_types/sqlite/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/overrides_go_types/sqlite/query.sql +++ b/internal/endtoend/testdata/overrides_go_types/sqlite/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 58eb3d2f64..78aae40b04 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.23.0 +// sqlc v1.30.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 a76836787f..1a12b9c4e4 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 52af22ecff..af9c0bfefe 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.23.0 +// sqlc v1.30.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 a76836787f..1a12b9c4e4 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 58eb3d2f64..78aae40b04 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.23.0 +// sqlc v1.30.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 62f8618b59..96d6e40680 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.23.0 +// sqlc v1.30.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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 7156f49213..0e8f9db623 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.23.0 +// sqlc v1.30.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 ad316396ab..0d0b9f293c 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.23.0 +// sqlc v1.30.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 447c41a4d1..d27a158d73 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.23.0 +// sqlc v1.30.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 a31f1d4b93..f6aa6a379a 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.23.0 +// sqlc v1.30.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 5462eabb8d..7b8cadff56 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.23.0 +// sqlc v1.30.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 43ae09184a..a6e06f5d0e 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.23.0 +// sqlc v1.30.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 a31f1d4b93..f6aa6a379a 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.23.0 +// sqlc v1.30.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 5462eabb8d..7b8cadff56 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.23.0 +// sqlc v1.30.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 d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.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 a31f1d4b93..f6aa6a379a 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.23.0 +// sqlc v1.30.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 81d8c7c00e..dfc39890c9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 fadeb0496c..f82d23a941 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.23.0 +// sqlc v1.30.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 f962e85163..deaf22a459 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 4b138c32b5..ae8927d7c8 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.23.0 +// sqlc v1.30.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 e9bcfdf88a..9ad07fc0be 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 00df6cc865..cab9171aaf 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.23.0 +// sqlc v1.30.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 51ce67993b..332cb9b26e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 00df6cc865..cab9171aaf 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.23.0 +// sqlc v1.30.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 3e55ad5e92..c93d3d9981 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 d35a1ad3ce..15d9d8ec70 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.23.0 +// sqlc v1.30.0 package querytest @@ -34,4 +34,5 @@ type GoKeyword struct { Import pgtype.Text Return pgtype.Text Var pgtype.Text + Q 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 index 4a62245684..5c4c6f5945 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -173,6 +173,15 @@ func (q *Queries) KeywordPackage(ctx context.Context, package_ string) error { return err } +const keywordQ = `-- name: KeywordQ :exec +SELECT $1::text +` + +func (q *Queries) KeywordQ(ctx context.Context, q_ string) error { + _, err := q.db.Exec(ctx, keywordQ, q_) + return err +} + const keywordRange = `-- name: KeywordRange :exec SELECT $1::text ` @@ -434,6 +443,17 @@ func (q *Queries) SelectPackage(ctx context.Context) (pgtype.Text, error) { return package_, err } +const selectQ = `-- name: SelectQ :one +SELECT "q" FROM go_keywords +` + +func (q *Queries) SelectQ(ctx context.Context) (pgtype.Text, error) { + row := q.db.QueryRow(ctx, selectQ) + var q_ pgtype.Text + err := row.Scan(&q_) + return q_, err +} + const selectRange = `-- name: SelectRange :one SELECT "range" FROM go_keywords ` diff --git a/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql b/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql index 70796e4e3e..bc45b1166f 100644 --- a/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/query.sql @@ -73,6 +73,9 @@ SELECT sqlc.arg('return')::text; -- name: KeywordVar :exec SELECT sqlc.arg('var')::text; +-- name: KeywordQ :exec +SELECT sqlc.arg('q')::text; + -- name: SelectBreak :one SELECT "break" FROM go_keywords; @@ -147,3 +150,6 @@ SELECT "return" FROM go_keywords; -- name: SelectVar :one SELECT "var" FROM go_keywords; + +-- name: SelectQ :one +SELECT "q" 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 index 11a04beef6..100be50211 100644 --- a/internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql +++ b/internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql @@ -23,5 +23,6 @@ CREATE TABLE go_keywords ( "for" TEXT, "import" TEXT, "return" TEXT, - "var" TEXT + "var" TEXT, + "q" TEXT ); diff --git a/internal/endtoend/testdata/params_in_nested_func/mysql/db/db.go b/internal/endtoend/testdata/params_in_nested_func/mysql/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/mysql/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/params_in_nested_func/mysql/db/models.go b/internal/endtoend/testdata/params_in_nested_func/mysql/db/models.go new file mode 100644 index 0000000000..1e7f7960a4 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/mysql/db/models.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Routergroup struct { + Groupid uint32 + Groupname string + Defaultconfigid sql.NullInt32 + Defaultfirmwareversion sql.NullString + Parentgroupid sql.NullInt32 + Firmwarepolicy sql.NullString + Styles sql.NullString +} diff --git a/internal/endtoend/testdata/params_in_nested_func/mysql/db/query.sql.go b/internal/endtoend/testdata/params_in_nested_func/mysql/db/query.sql.go new file mode 100644 index 0000000000..70e532ae4e --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/mysql/db/query.sql.go @@ -0,0 +1,55 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" + "database/sql" +) + +const getGroups = `-- name: GetGroups :many +SELECT + rg.groupId, + rg.groupName +FROM + RouterGroup rg +WHERE + rg.groupName LIKE CONCAT('%', COALESCE(?, rg.groupName), '%') AND + rg.groupId = COALESCE(?, rg.groupId) +` + +type GetGroupsParams struct { + GroupName interface{} + GroupId sql.NullInt32 +} + +type GetGroupsRow struct { + Groupid uint32 + Groupname string +} + +func (q *Queries) GetGroups(ctx context.Context, arg GetGroupsParams) ([]GetGroupsRow, error) { + rows, err := q.db.QueryContext(ctx, getGroups, arg.GroupName, arg.GroupId) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetGroupsRow + for rows.Next() { + var i GetGroupsRow + if err := rows.Scan(&i.Groupid, &i.Groupname); 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/params_in_nested_func/mysql/query.sql b/internal/endtoend/testdata/params_in_nested_func/mysql/query.sql new file mode 100644 index 0000000000..8a2a78fa36 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/mysql/query.sql @@ -0,0 +1,9 @@ +-- name: GetGroups :many +SELECT + rg.groupId, + rg.groupName +FROM + RouterGroup rg +WHERE + rg.groupName LIKE CONCAT('%', COALESCE(sqlc.narg('groupName'), rg.groupName), '%') AND + rg.groupId = COALESCE(sqlc.narg('groupId'), rg.groupId); diff --git a/internal/endtoend/testdata/params_in_nested_func/mysql/schema.sql b/internal/endtoend/testdata/params_in_nested_func/mysql/schema.sql new file mode 100644 index 0000000000..12e0fb3b85 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/mysql/schema.sql @@ -0,0 +1,10 @@ +create table RouterGroup +( + groupId int unsigned auto_increment primary key, + groupName varchar(100) not null, + defaultConfigId int unsigned null, + defaultFirmwareVersion varchar(12) null, + parentGroupId int unsigned null, + firmwarePolicy varchar(45) null, + styles text null +); diff --git a/internal/endtoend/testdata/params_in_nested_func/mysql/sqlc.yaml b/internal/endtoend/testdata/params_in_nested_func/mysql/sqlc.yaml new file mode 100644 index 0000000000..e8b45d313d --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/mysql/sqlc.yaml @@ -0,0 +1,8 @@ +version: '2' +sql: +- schema: schema.sql + queries: query.sql + engine: mysql + gen: + go: + out: db diff --git a/internal/endtoend/testdata/params_in_nested_func/postgresql/db/db.go b/internal/endtoend/testdata/params_in_nested_func/postgresql/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/postgresql/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/params_in_nested_func/postgresql/db/models.go b/internal/endtoend/testdata/params_in_nested_func/postgresql/db/models.go new file mode 100644 index 0000000000..385bc233aa --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/postgresql/db/models.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Routergroup struct { + Groupid int32 + Groupname string + Defaultconfigid sql.NullInt32 + Defaultfirmwareversion sql.NullString + Parentgroupid sql.NullInt32 + Firmwarepolicy sql.NullString + Styles sql.NullString +} diff --git a/internal/endtoend/testdata/params_in_nested_func/postgresql/db/query.sql.go b/internal/endtoend/testdata/params_in_nested_func/postgresql/db/query.sql.go new file mode 100644 index 0000000000..32ab16ccc6 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/postgresql/db/query.sql.go @@ -0,0 +1,55 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" + "database/sql" +) + +const getGroups = `-- name: GetGroups :many +SELECT + rg.groupId, + rg.groupName +FROM + RouterGroup rg +WHERE + rg.groupName LIKE CONCAT('%', COALESCE($1::text, rg.groupName), '%') AND + rg.groupId = COALESCE($2, rg.groupId) +` + +type GetGroupsParams struct { + GroupName sql.NullString + GroupId sql.NullInt32 +} + +type GetGroupsRow struct { + Groupid int32 + Groupname string +} + +func (q *Queries) GetGroups(ctx context.Context, arg GetGroupsParams) ([]GetGroupsRow, error) { + rows, err := q.db.QueryContext(ctx, getGroups, arg.GroupName, arg.GroupId) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetGroupsRow + for rows.Next() { + var i GetGroupsRow + if err := rows.Scan(&i.Groupid, &i.Groupname); 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/params_in_nested_func/postgresql/query.sql b/internal/endtoend/testdata/params_in_nested_func/postgresql/query.sql new file mode 100644 index 0000000000..7732269d25 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/postgresql/query.sql @@ -0,0 +1,9 @@ +-- name: GetGroups :many +SELECT + rg.groupId, + rg.groupName +FROM + RouterGroup rg +WHERE + rg.groupName LIKE CONCAT('%', COALESCE(sqlc.narg('groupName')::text, rg.groupName), '%') AND + rg.groupId = COALESCE(sqlc.narg('groupId'), rg.groupId); diff --git a/internal/endtoend/testdata/params_in_nested_func/postgresql/schema.sql b/internal/endtoend/testdata/params_in_nested_func/postgresql/schema.sql new file mode 100644 index 0000000000..66cfd02733 --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/postgresql/schema.sql @@ -0,0 +1,10 @@ +create table RouterGroup +( + groupId serial primary key, + groupName varchar(100) not null, + defaultConfigId int null, + defaultFirmwareVersion varchar(12) null, + parentGroupId int null, + firmwarePolicy varchar(45) null, + styles text null +); diff --git a/internal/endtoend/testdata/params_in_nested_func/postgresql/sqlc.yaml b/internal/endtoend/testdata/params_in_nested_func/postgresql/sqlc.yaml new file mode 100644 index 0000000000..936b0171ee --- /dev/null +++ b/internal/endtoend/testdata/params_in_nested_func/postgresql/sqlc.yaml @@ -0,0 +1,8 @@ +version: '2' +sql: +- schema: schema.sql + queries: query.sql + engine: postgresql + gen: + go: + out: db diff --git a/internal/endtoend/testdata/params_location/mysql/go/db.go b/internal/endtoend/testdata/params_location/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 98a508f47e..54ca4ce9d6 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.23.0 +// sqlc v1.30.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 bd911dbfa4..908e4240d4 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 237df1cad8..9a2addf733 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.23.0 +// sqlc v1.30.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 113d0f0e27..2422761542 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 04069cd49d..333ac0e7e3 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.23.0 +// sqlc v1.30.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 4367ba89b5..5df3216911 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 98a508f47e..54ca4ce9d6 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.23.0 +// sqlc v1.30.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 87a8fb0425..6f4b961034 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0180945d88..6ed28e2de9 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.23.0 +// sqlc v1.30.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 11b8b7a1a3..57aba80593 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0180945d88..6ed28e2de9 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.23.0 +// sqlc v1.30.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 dcf59b0811..a04cba9fe0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 3a7f3ddec5..9f1edc6aef 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 f652726be5..da0ea85d0d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 ce8c7d1453..3ee86d8810 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.23.0 +// sqlc v1.30.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 0d17067712..5c7953cc70 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 dfe044d038..5797bf0f08 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a2403eea1e..41f892cc4a 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.23.0 +// sqlc v1.30.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 42694f58cd..7fdf362fca 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9690f5a8a9..a6a5f8c7bb 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.23.0 +// sqlc v1.30.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 f9d3af0301..447ffb9e92 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9690f5a8a9..a6a5f8c7bb 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.23.0 +// sqlc v1.30.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 789dfc4339..2c8760f573 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 4294d252a2..b2064e0ae9 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 b29498810c..75c3f3fbfc 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 4294d252a2..b2064e0ae9 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 31d1d0324a..2b71b44b77 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 492cb62614..4c03334188 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 d5a5e23c82..49fc5359d6 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.0 package db diff --git a/internal/endtoend/testdata/pg_dump/db/models.go b/internal/endtoend/testdata/pg_dump/db/models.go index d3e56d7d47..5041799d54 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.23.0 +// sqlc v1.30.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 931426f305..85c204d6fb 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.23.0 +// sqlc v1.30.0 // source: query.sql package db diff --git a/internal/endtoend/testdata/pg_dump/exec.json b/internal/endtoend/testdata/pg_dump/exec.json index c16f123ce3..c85ca2dfa7 100644 --- a/internal/endtoend/testdata/pg_dump/exec.json +++ b/internal/endtoend/testdata/pg_dump/exec.json @@ -1,3 +1,6 @@ { - "contexts": ["base"] -} \ No newline at end of file + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 f749bd3472..54e621c88d 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.23.0 +// sqlc v1.30.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 c53eebe8a6..31921b6bc1 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e0bdec9c4f..ad35c8fc69 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.23.0 +// sqlc v1.30.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 c53eebe8a6..31921b6bc1 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f749bd3472..54e621c88d 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.23.0 +// sqlc v1.30.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 e67ec01904..762e65ce5b 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 a665070227..194612b305 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.23.0 +// sqlc v1.30.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 02c7ffd9b1..af48da80f1 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.23.0 +// sqlc v1.30.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 249ecd281e..e59868c6f3 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 a665070227..194612b305 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.23.0 +// sqlc v1.30.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 02c7ffd9b1..af48da80f1 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.23.0 +// sqlc v1.30.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 5836a9bb2d..2d17d87349 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 b25adbd836..ba8c0c9aff 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.23.0 +// sqlc v1.30.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 f520f98dc4..248873db67 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.23.0 +// sqlc v1.30.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 c75f1ec69e..7318c4d149 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 cada4711c2..5a2f13da51 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 2101806b89..b1afe1a0f3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 929d22e4cb..3f78c01386 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 3b6b0b9b97..75e0538c92 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 774daac194..6b36384a09 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go +++ b/internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 26a4f0b21f..8b18058453 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/pg_timezone_names/schema.sql b/internal/endtoend/testdata/pg_timezone_names/schema.sql new file mode 100644 index 0000000000..e0ac49d1ec --- /dev/null +++ b/internal/endtoend/testdata/pg_timezone_names/schema.sql @@ -0,0 +1 @@ +SELECT 1; diff --git a/internal/endtoend/testdata/pg_timezone_names/sqlc.json b/internal/endtoend/testdata/pg_timezone_names/sqlc.json index 404ef769a9..1f0b8cd3d6 100644 --- a/internal/endtoend/testdata/pg_timezone_names/sqlc.json +++ b/internal/endtoend/testdata/pg_timezone_names/sqlc.json @@ -3,7 +3,7 @@ "sql": [ { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { @@ -15,7 +15,7 @@ }, { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { @@ -27,7 +27,7 @@ }, { "engine": "postgresql", - "schema": "query.sql", + "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 952c3860ad..4debf38e23 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 952c3860ad..4debf38e23 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 45145aaa44..7a00bcb08b 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type User struct { ID int64 } 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 53ecb88bf3..fc2d9b248e 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest 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..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a53a40fd14..5921a1e292 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.23.0 +// sqlc v1.30.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 2e823832f7..20db5866bd 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.23.0 +// sqlc v1.30.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 7fd32d6893..4e47262b7d 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.23.0 +// sqlc v1.30.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 d315db0269..048c2f7457 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.23.0 +// sqlc v1.30.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 ba0f841c16..5c76759055 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.23.0 +// sqlc v1.30.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 7d61537ef5..2853d5f77e 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.23.0 +// sqlc v1.30.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 8b1acfa0ea..af33c734e5 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.23.0 +// sqlc v1.30.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 4ee73cf0f5..2098df405f 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.23.0 +// sqlc v1.30.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 1db9a8278e..e35a714344 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.23.0 +// sqlc v1.30.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 a26bb00a6f..d8ac2c0dcb 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.23.0 +// sqlc v1.30.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 d79741f934..530dca1939 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.23.0 +// sqlc v1.30.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 1db9a8278e..e35a714344 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.23.0 +// sqlc v1.30.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 cbfef2f926..7043a480a5 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.23.0 +// sqlc v1.30.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 3e6fd500b4..eca6854f2e 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.23.0 +// sqlc v1.30.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 76efb8a9d9..6b6e1f86ce 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.23.0 +// sqlc v1.30.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 1938374c33..201035a605 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.23.0 +// sqlc v1.30.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 bed11142a7..7f977f1181 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.23.0 +// sqlc v1.30.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 12b868955a..0e46e3ac82 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.23.0 +// sqlc v1.30.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 8fa3266854..e0e8d9f649 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.23.0 +// sqlc v1.30.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 bed11142a7..7f977f1181 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.23.0 +// sqlc v1.30.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 d09186ae78..3091c8d82e 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.23.0 +// sqlc v1.30.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 1938374c33..201035a605 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.23.0 +// sqlc v1.30.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 c0643657fc..3cb37cdb45 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.23.0 +// sqlc v1.30.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 29278472ab..06bc46aa71 100644 --- a/internal/endtoend/testdata/process_plugin_disabled/gen/codegen.json +++ b/internal/endtoend/testdata/process_plugin_disabled/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, + "emit_sql_as_comment": false }, "json": { "out": "", @@ -65397,6 +65398,6 @@ "insert_into_table": null } ], - "sqlc_version": "v1.23.0", + "sqlc_version": "v1.30.0", "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" } diff --git a/internal/endtoend/testdata/process_plugin_format_json/exec.json b/internal/endtoend/testdata/process_plugin_format_json/exec.json new file mode 100644 index 0000000000..2cfb9f266d --- /dev/null +++ b/internal/endtoend/testdata/process_plugin_format_json/exec.json @@ -0,0 +1,4 @@ +{ + "process": "test-json-process-plugin", + "os": [ "darwin", "linux" ] +} diff --git a/internal/endtoend/testdata/process_plugin_format_json/gen/hello.txt b/internal/endtoend/testdata/process_plugin_format_json/gen/hello.txt new file mode 100644 index 0000000000..05d6799f15 --- /dev/null +++ b/internal/endtoend/testdata/process_plugin_format_json/gen/hello.txt @@ -0,0 +1,12 @@ +SELECT id, name, bio FROM authors +WHERE id = $1 LIMIT 1 +SELECT id, name, bio FROM authors +ORDER BY name +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +RETURNING id, name, bio +DELETE FROM authors +WHERE id = $1 diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.sql b/internal/endtoend/testdata/process_plugin_format_json/query.sql similarity index 100% rename from internal/endtoend/testdata/emit_pydantic_models/postgresql/query.sql rename to internal/endtoend/testdata/process_plugin_format_json/query.sql diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/schema.sql b/internal/endtoend/testdata/process_plugin_format_json/schema.sql similarity index 100% rename from internal/endtoend/testdata/emit_pydantic_models/postgresql/schema.sql rename to internal/endtoend/testdata/process_plugin_format_json/schema.sql diff --git a/internal/endtoend/testdata/process_plugin_format_json/sqlc.json b/internal/endtoend/testdata/process_plugin_format_json/sqlc.json new file mode 100644 index 0000000000..28055fa571 --- /dev/null +++ b/internal/endtoend/testdata/process_plugin_format_json/sqlc.json @@ -0,0 +1,25 @@ +{ + "version": "2", + "sql": [ + { + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "codegen": [ + { + "out": "gen", + "plugin": "jsonb" + } + ] + } + ], + "plugins": [ + { + "name": "jsonb", + "process": { + "cmd": "test-json-process-plugin", + "format": "json" + } + } + ] +} 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 2e996ca79d..e38046cf57 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,4 @@ { - "contexts": ["base"] + "contexts": ["base"], + "process": "sqlc-gen-json" } 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 cd1be9de2b..0c7282ac9c 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 @@ -8,8 +8,6 @@ "queries": [ "query.sql" ], - "rename": {}, - "overrides": [], "codegen": { "out": "gen", "plugin": "jsonb", @@ -65367,6 +65365,7 @@ "insert_into_table": null } ], - "sqlc_version": "v1.23.0", - "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" + "sqlc_version": "v1.30.0", + "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=", + "global_options": "" } diff --git a/internal/endtoend/testdata/process_plugin_sqlc_gen_test/exec.json b/internal/endtoend/testdata/process_plugin_sqlc_gen_test/exec.json index 7865c9ec17..1aa4920cb9 100644 --- a/internal/endtoend/testdata/process_plugin_sqlc_gen_test/exec.json +++ b/internal/endtoend/testdata/process_plugin_sqlc_gen_test/exec.json @@ -1,3 +1,4 @@ { - "process": "sqlc-gen-test" -} \ No newline at end of file + "process": "sqlc-gen-test", + "os": ["linux", "darwin"] +} 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 483ff8e17f..fa4beb305c 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.23.0", + "SQLC_VERSION=v1.30.0", "SQLC_DUMMY_VALUE=true" ] } 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 deleted file mode 100644 index b96c66b9b3..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/query.sql +++ /dev/null @@ -1,5 +0,0 @@ --- name: DeleteBarByID :execrows -DELETE FROM bar WHERE id = $1; - --- name: DeleteBarByIDAndName :execrows -DELETE FROM bar WHERE id = $1 AND name = $2; 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 deleted file mode 100644 index fd3ca97902..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/schema.sql +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d431feabb5..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/sqlc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true, - "query_parameter_limit": -1 - } - } - ] - } - ] -} diff --git a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/stderr.txt b/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/stderr.txt deleted file mode 100644 index efed0cc10b..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/-1/python_postgresql/stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -# package py -error generating code: error generating output: invalid query parameter limit 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 deleted file mode 100644 index 9bc595f2a0..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/models.py +++ /dev/null @@ -1,10 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Bar: - id: int - name: str 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 deleted file mode 100644 index 2a4251704f..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/python/query.py +++ /dev/null @@ -1,57 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -import dataclasses - -import sqlalchemy -import sqlalchemy.ext.asyncio - -from querytest import models - - -DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:execrows -DELETE FROM bar WHERE id = :p1 -""" - - -@dataclasses.dataclass() -class DeleteBarByIDParams: - id: int - - -DELETE_BAR_BY_ID_AND_NAME = """-- name: delete_bar_by_id_and_name \\:execrows -DELETE FROM bar WHERE id = :p1 AND name = :p2 -""" - - -@dataclasses.dataclass() -class DeleteBarByIDAndNameParams: - id: int - name: str - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def delete_bar_by_id(self, arg: DeleteBarByIDParams) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": arg.id}) - return result.rowcount - - def delete_bar_by_id_and_name(self, arg: DeleteBarByIDAndNameParams) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID_AND_NAME), {"p1": arg.id, "p2": arg.name}) - return result.rowcount - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def delete_bar_by_id(self, arg: DeleteBarByIDParams) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": arg.id}) - return result.rowcount - - async def delete_bar_by_id_and_name(self, arg: DeleteBarByIDAndNameParams) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID_AND_NAME), {"p1": arg.id, "p2": arg.name}) - return result.rowcount 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 deleted file mode 100644 index b96c66b9b3..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/query.sql +++ /dev/null @@ -1,5 +0,0 @@ --- name: DeleteBarByID :execrows -DELETE FROM bar WHERE id = $1; - --- name: DeleteBarByIDAndName :execrows -DELETE FROM bar WHERE id = $1 AND name = $2; 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 deleted file mode 100644 index a27c312e36..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/schema.sql +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 2bda86ec51..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/0/python_postgresql/sqlc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true, - "query_parameter_limit": 0 - } - } - ] - } - ] -} 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 deleted file mode 100644 index 9bc595f2a0..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/models.py +++ /dev/null @@ -1,10 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Bar: - id: int - name: str 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 deleted file mode 100644 index 3ca9cba99f..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/python/query.py +++ /dev/null @@ -1,44 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -import sqlalchemy -import sqlalchemy.ext.asyncio - -from querytest import models - - -DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:execrows -DELETE FROM bar WHERE id = :p1 -""" - - -DELETE_BAR_BY_ID_AND_NAME = """-- name: delete_bar_by_id_and_name \\:execrows -DELETE FROM bar WHERE id = :p1 AND name = :p2 -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def delete_bar_by_id(self, *, id: int) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - return result.rowcount - - def delete_bar_by_id_and_name(self, *, id: int, name: str) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID_AND_NAME), {"p1": id, "p2": name}) - return result.rowcount - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def delete_bar_by_id(self, *, id: int) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - return result.rowcount - - async def delete_bar_by_id_and_name(self, *, id: int, name: str) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID_AND_NAME), {"p1": id, "p2": name}) - return result.rowcount 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 deleted file mode 100644 index b96c66b9b3..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/query.sql +++ /dev/null @@ -1,5 +0,0 @@ --- name: DeleteBarByID :execrows -DELETE FROM bar WHERE id = $1; - --- name: DeleteBarByIDAndName :execrows -DELETE FROM bar WHERE id = $1 AND name = $2; 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 deleted file mode 100644 index a27c312e36..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/schema.sql +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index a0c6fd8680..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/2/python_postgresql/sqlc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.1.0.wasm", - "sha256": "ef58f143a8c116781091441770c7166caaf361dd645f62b8f05f462e9f95c3b2" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true, - "query_parameter_limit": 2 - } - } - ] - } - ] -} 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 deleted file mode 100644 index 5e2f6558cf..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/models.py +++ /dev/null @@ -1,12 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -import dataclasses - - -@dataclasses.dataclass() -class Bar: - id: int - name1: str - name2: str - name3: str 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 deleted file mode 100644 index 4dccfa9968..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/python/query.py +++ /dev/null @@ -1,58 +0,0 @@ -# Code generated by sqlc. DO NOT EDIT. -# versions: -# sqlc v1.23.0 -# source: query.sql -import sqlalchemy -import sqlalchemy.ext.asyncio - -from querytest import models - - -DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:execrows -DELETE FROM bar WHERE id = :p1 -""" - - -DELETE_BAR_BY_ID_AND_NAME = """-- name: delete_bar_by_id_and_name \\:execrows -DELETE FROM bar -WHERE id = :p1 -AND name1 = :p2 -AND name2 = :p3 -AND name3 = :p4 -""" - - -class Querier: - def __init__(self, conn: sqlalchemy.engine.Connection): - self._conn = conn - - def delete_bar_by_id(self, *, id: int) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - return result.rowcount - - def delete_bar_by_id_and_name(self, *, id: int, name1: str, name2: str, name3: str) -> int: - result = self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID_AND_NAME), { - "p1": id, - "p2": name1, - "p3": name2, - "p4": name3, - }) - return result.rowcount - - -class AsyncQuerier: - def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection): - self._conn = conn - - async def delete_bar_by_id(self, *, id: int) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id}) - return result.rowcount - - async def delete_bar_by_id_and_name(self, *, id: int, name1: str, name2: str, name3: str) -> int: - result = await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID_AND_NAME), { - "p1": id, - "p2": name1, - "p3": name2, - "p4": name3, - }) - return result.rowcount 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 deleted file mode 100644 index aea85112e0..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/query.sql +++ /dev/null @@ -1,10 +0,0 @@ --- name: DeleteBarByID :execrows -DELETE FROM bar WHERE id = $1; - --- name: DeleteBarByIDAndName :execrows -DELETE FROM bar -WHERE id = $1 -AND name1 = $2 -AND name2 = $3 -AND name3 = $4 -; 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 deleted file mode 100644 index 1d9131f472..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/schema.sql +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index c20cad43af..0000000000 --- a/internal/endtoend/testdata/query_parameter_limit/undefined/python_postgresql/sqlc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "2", - "plugins": [ - { - "name": "py", - "wasm": { - "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.0.0.wasm", - "sha256": "aca83e1f59f8ffdc604774c2f6f9eb321a2b23e07dc83fc12289d25305fa065b" - } - } - ], - "sql": [ - { - "schema": "schema.sql", - "queries": "query.sql", - "engine": "postgresql", - "codegen": [ - { - "plugin": "py", - "out": "python", - "options": { - "package": "querytest", - "emit_sync_querier": true, - "emit_async_querier": true - } - } - ] - } - ] -} diff --git a/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/query.sql b/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/query.sql index eb10e5cb4c..a71d662465 100644 --- a/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/query.sql +++ b/internal/endtoend/testdata/query_parameter_limit_invalid/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_invalid/postgresql/schema.sql b/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/schema.sql new file mode 100644 index 0000000000..6027f56d97 --- /dev/null +++ b/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/schema.sql @@ -0,0 +1,6 @@ +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_invalid/postgresql/sqlc.json b/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/sqlc.json index 4d1fb3f94d..c473270913 100644 --- a/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/sqlc.json +++ b/internal/endtoend/testdata/query_parameter_limit_invalid/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": -1 } diff --git a/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/stderr.txt b/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/stderr.txt index 2f0a7a559a..9e1760ffca 100644 --- a/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/stderr.txt +++ b/internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/stderr.txt @@ -1 +1,2 @@ -error parsing sqlc.json: invalid query parameter limit +# package querytest +error generating code: invalid options: query parameter limit must not be negative 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 311f94f692..bf48c95dcc 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.23.0 +// sqlc v1.30.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 3b3f8beece..571c4c2e91 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.23.0 +// sqlc v1.30.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 1fdfe974fc..065ea6b556 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 539e2652b1..fff4b9d91a 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.23.0 +// sqlc v1.30.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 9fbcf88a52..af0d591ad1 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2d57a70cf3..db9108bb80 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.23.0 +// sqlc v1.30.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 016c017d7d..0d2ece1477 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.23.0 +// sqlc v1.30.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 05ff91e1cf..e0aa6b8c1b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 5f17a1dc5c..11b0271bc3 100644 --- a/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go +++ b/internal/endtoend/testdata/quoted_colname/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Test struct { ID string } 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 deb1ae8a7d..5c12e677f6 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/quoted_names_complex/sqlite/go/db.go b/internal/endtoend/testdata/quoted_names_complex/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/quoted_names_complex/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/quoted_names_complex/sqlite/go/models.go b/internal/endtoend/testdata/quoted_names_complex/sqlite/go/models.go new file mode 100644 index 0000000000..333ea43ea3 --- /dev/null +++ b/internal/endtoend/testdata/quoted_names_complex/sqlite/go/models.go @@ -0,0 +1,5 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest diff --git a/internal/endtoend/testdata/quoted_names_complex/sqlite/go/query.sql.go b/internal/endtoend/testdata/quoted_names_complex/sqlite/go/query.sql.go new file mode 100644 index 0000000000..3f59aec9b9 --- /dev/null +++ b/internal/endtoend/testdata/quoted_names_complex/sqlite/go/query.sql.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const placeholder = `-- name: Placeholder :exec +SELECT 1 +` + +func (q *Queries) Placeholder(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, placeholder) + return err +} diff --git a/internal/endtoend/testdata/quoted_names_complex/sqlite/query.sql b/internal/endtoend/testdata/quoted_names_complex/sqlite/query.sql new file mode 100644 index 0000000000..6520aef4b6 --- /dev/null +++ b/internal/endtoend/testdata/quoted_names_complex/sqlite/query.sql @@ -0,0 +1,2 @@ +-- name: Placeholder :exec +SELECT 1; diff --git a/internal/endtoend/testdata/quoted_names_complex/sqlite/schema.sql b/internal/endtoend/testdata/quoted_names_complex/sqlite/schema.sql new file mode 100644 index 0000000000..fc6a73756e --- /dev/null +++ b/internal/endtoend/testdata/quoted_names_complex/sqlite/schema.sql @@ -0,0 +1,22 @@ +-- Test complex quoted table and column names with special characters +-- Covers spaces, hyphens, uppercase, and mixed operations +CREATE TABLE "user profiles" (id integer primary key, data text); +CREATE TABLE "ORDERS" (id integer primary key, data text); +CREATE TABLE products (id integer primary key, data text); +CREATE TABLE "item-categories" (id integer primary key, data text); + +-- Test ALTER statements with complex identifiers +ALTER TABLE "user profiles" RENAME COLUMN data TO "profile data"; +ALTER TABLE "ORDERS" RENAME TO "customer_orders"; +ALTER TABLE products ADD COLUMN "Price Info" text; + +-- Test mixed case operations across different statement types +INSERT INTO "user profiles" ("profile data") VALUES ('test data'); +UPDATE "ORDERS" SET data = 'updated' WHERE id = 1; +DELETE FROM products WHERE id = 1; + +-- Test DROP with various identifier formats +DROP TABLE "user profiles"; +DROP TABLE "customer_orders"; +DROP TABLE "item-categories"; +DROP TABLE products; diff --git a/internal/endtoend/testdata/quoted_names_complex/sqlite/sqlc.json b/internal/endtoend/testdata/quoted_names_complex/sqlite/sqlc.json new file mode 100644 index 0000000000..cd66df063b --- /dev/null +++ b/internal/endtoend/testdata/quoted_names_complex/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "sqlite", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/quoted_tablename/sqlite/go/db.go b/internal/endtoend/testdata/quoted_tablename/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/quoted_tablename/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/quoted_tablename/sqlite/go/models.go b/internal/endtoend/testdata/quoted_tablename/sqlite/go/models.go new file mode 100644 index 0000000000..1bbac6281c --- /dev/null +++ b/internal/endtoend/testdata/quoted_tablename/sqlite/go/models.go @@ -0,0 +1,9 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +type User struct { + ID string +} diff --git a/internal/endtoend/testdata/quoted_tablename/sqlite/go/query.sql.go b/internal/endtoend/testdata/quoted_tablename/sqlite/go/query.sql.go new file mode 100644 index 0000000000..e6f06662ab --- /dev/null +++ b/internal/endtoend/testdata/quoted_tablename/sqlite/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const testList = `-- name: TestList :many +SELECT id FROM users +` + +func (q *Queries) TestList(ctx context.Context) ([]string, error) { + rows, err := q.db.QueryContext(ctx, testList) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var id string + if err := rows.Scan(&id); err != nil { + return nil, err + } + items = append(items, id) + } + 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/quoted_tablename/sqlite/query.sql b/internal/endtoend/testdata/quoted_tablename/sqlite/query.sql new file mode 100644 index 0000000000..0d3b8e238b --- /dev/null +++ b/internal/endtoend/testdata/quoted_tablename/sqlite/query.sql @@ -0,0 +1,2 @@ +-- name: TestList :many +SELECT * FROM users; diff --git a/internal/endtoend/testdata/quoted_tablename/sqlite/schema.sql b/internal/endtoend/testdata/quoted_tablename/sqlite/schema.sql new file mode 100644 index 0000000000..078fa24bf6 --- /dev/null +++ b/internal/endtoend/testdata/quoted_tablename/sqlite/schema.sql @@ -0,0 +1,6 @@ +-- Example queries for sqlc +CREATE TABLE "users" +( + id TEXT NOT NULL +); + diff --git a/internal/endtoend/testdata/quoted_tablename/sqlite/sqlc.json b/internal/endtoend/testdata/quoted_tablename/sqlite/sqlc.json new file mode 100644 index 0000000000..ea4a23425f --- /dev/null +++ b/internal/endtoend/testdata/quoted_tablename/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "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/ranges/pgx/v5/go/db.go b/internal/endtoend/testdata/ranges/pgx/v5/go/db.go index 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f7bc2ff7e9..07e82ad410 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.23.0 +// sqlc v1.30.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 5229249255..7231704edd 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 74d1651ce7..f09d714a39 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Myview struct { int32 } 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 ffb44a48f4..cee6ee9091 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 74d1651ce7..f09d714a39 100644 --- a/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Myview struct { int32 } 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 ffb44a48f4..cee6ee9091 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 da6f27b600..7036918b46 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.23.0 +// sqlc v1.30.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 e3bb83ff68..30a1622132 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 da6f27b600..7036918b46 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.23.0 +// sqlc v1.30.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 e3bb83ff68..30a1622132 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 da6f27b600..7036918b46 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.23.0 +// sqlc v1.30.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 ca9b6e26a1..b4f51c51fa 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 da6f27b600..7036918b46 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.23.0 +// sqlc v1.30.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 e3bb83ff68..30a1622132 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 da6f27b600..7036918b46 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.23.0 +// sqlc v1.30.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 e3bb83ff68..30a1622132 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 da6f27b600..7036918b46 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.23.0 +// sqlc v1.30.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 ca9b6e26a1..b4f51c51fa 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8571ad2587..ca9c03dd51 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.23.0 +// sqlc v1.30.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 b0558a4cca..c3c9a1d03d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 76a075ba15..be032c0c74 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.23.0 +// sqlc v1.30.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 ab3a619c44..20a0a245a2 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8571ad2587..ca9c03dd51 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.23.0 +// sqlc v1.30.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 56e5487e63..05d38d3c2a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/returning/sqlite/go/models.go b/internal/endtoend/testdata/returning/sqlite/go/models.go index c9e27f3914..5385a7eebc 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.23.0 +// sqlc v1.30.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 74621be5e9..8767922088 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_create/mysql/exec.json b/internal/endtoend/testdata/schema_scoped_create/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4c357adc1a..d9da85602e 100644 --- a/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID uint64 Name string 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 d74e8e60c5..0217d24cf3 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 f0aa308477..db32907a18 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 Name string 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 3a2c9103f7..553162e34c 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f0aa308477..db32907a18 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 Name string 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 3a2c9103f7..553162e34c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f0aa308477..db32907a18 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 Name string 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 af007d6f77..f8431ee605 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_delete/mysql/exec.json b/internal/endtoend/testdata/schema_scoped_delete/mysql/exec.json new file mode 100644 index 0000000000..a0e224b3f8 --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/exec.json @@ -0,0 +1,7 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} + \ No newline at end of file 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7177a52ebd..598edf2ec6 100644 --- a/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID uint64 } 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 113e84b3d5..210e348762 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 e54fd89440..ddee18e0e4 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 e54fd89440..ddee18e0e4 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 0ac6903f95..b3066b689b 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e3fce17619..1c13b04072 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.23.0 +// sqlc v1.30.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 b4eadac872..3f490bbcf0 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e3fce17619..1c13b04072 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.23.0 +// sqlc v1.30.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 b4eadac872..3f490bbcf0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 e3fce17619..1c13b04072 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.23.0 +// sqlc v1.30.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 3fc2830cc5..b20ca177cd 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/exec.json b/internal/endtoend/testdata/schema_scoped_filter/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7177a52ebd..598edf2ec6 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID uint64 } 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 aa8a00942e..40c7da8c0c 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql b/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql index a22ab0907d..e5cb43f4bf 100644 --- a/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql +++ b/internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql @@ -1,3 +1,2 @@ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); - 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 bd0770069c..304d36042d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 bd0770069c..304d36042d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 343fbc63a2..3d11584e6e 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_list/mysql/exec.json b/internal/endtoend/testdata/schema_scoped_list/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 7177a52ebd..598edf2ec6 100644 --- a/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID uint64 } 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 c5621116b7..6a26f8a6b4 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 abaeef3df6..333d990343 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 abaeef3df6..333d990343 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 96ce6e473c..f90d97a6eb 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 } 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 6f6729c466..33e8ff0096 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_scoped_update/mysql/exec.json b/internal/endtoend/testdata/schema_scoped_update/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 4c357adc1a..d9da85602e 100644 --- a/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go +++ b/internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID uint64 Name string 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 458889ceff..8e4d7546d5 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 f0aa308477..db32907a18 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 Name string 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 e919c24ce4..54e213ac9f 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f0aa308477..db32907a18 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 Name string 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 e919c24ce4..54e213ac9f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f0aa308477..db32907a18 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type FooBar struct { ID int32 Name string 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 05f37b0ae0..cfbc8429e9 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/schema_table_column_ref/issue.md b/internal/endtoend/testdata/schema_table_column_ref/issue.md new file mode 100644 index 0000000000..f58a7d02d1 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/issue.md @@ -0,0 +1 @@ +https://github.com/sqlc-dev/sqlc/issues/2948 diff --git a/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/db.go b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/db.go new file mode 100644 index 0000000000..1e00549714 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/schema_table_column_ref/postgresql/pgx/go/models.go b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/models.go new file mode 100644 index 0000000000..225430ef85 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/models.go @@ -0,0 +1,23 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type AstoriaSlackFeedback struct { + ID int64 + WorkspaceID int64 + CreatedAt pgtype.Timestamp + IssueRaised pgtype.Bool +} + +type AstoriaTicket struct { + ID int64 + WorkspaceID int64 + CreatedAt pgtype.Timestamp + Source string +} diff --git a/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/query.sql.go b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/query.sql.go new file mode 100644 index 0000000000..2b55ca7204 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/query.sql.go @@ -0,0 +1,77 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const getTotalSlackQueries = `-- name: GetTotalSlackQueries :one +SELECT + COUNT(*) AS count +FROM astoria.slack_feedback +WHERE astoria.slack_feedback.workspace_id = $1 +AND created_at BETWEEN $2::date AND $3::date +` + +type GetTotalSlackQueriesParams struct { + WorkspaceID int64 + Column2 pgtype.Date + Column3 pgtype.Date +} + +func (q *Queries) GetTotalSlackQueries(ctx context.Context, arg GetTotalSlackQueriesParams) (int64, error) { + row := q.db.QueryRow(ctx, getTotalSlackQueries, arg.WorkspaceID, arg.Column2, arg.Column3) + var count int64 + err := row.Scan(&count) + return count, err +} + +const getTotalSlackQueriesRequestsCreated = `-- name: GetTotalSlackQueriesRequestsCreated :one +SELECT + COUNT(*) AS count +FROM astoria.tickets +WHERE astoria.tickets.workspace_id = $1 + AND source = 'RAISED_FROM_BOT' + AND created_at BETWEEN $2::date AND $3::date +` + +type GetTotalSlackQueriesRequestsCreatedParams struct { + WorkspaceID int64 + Column2 pgtype.Date + Column3 pgtype.Date +} + +func (q *Queries) GetTotalSlackQueriesRequestsCreated(ctx context.Context, arg GetTotalSlackQueriesRequestsCreatedParams) (int64, error) { + row := q.db.QueryRow(ctx, getTotalSlackQueriesRequestsCreated, arg.WorkspaceID, arg.Column2, arg.Column3) + var count int64 + err := row.Scan(&count) + return count, err +} + +const getTotalSlackQueriesResolved = `-- name: GetTotalSlackQueriesResolved :one +SELECT + COUNT(*) AS count +FROM astoria.slack_feedback +WHERE astoria.slack_feedback.workspace_id = $1 + AND (issue_raised = false OR issue_raised IS NULL) + AND created_at BETWEEN $2::date AND $3::date +` + +type GetTotalSlackQueriesResolvedParams struct { + WorkspaceID int64 + Column2 pgtype.Date + Column3 pgtype.Date +} + +func (q *Queries) GetTotalSlackQueriesResolved(ctx context.Context, arg GetTotalSlackQueriesResolvedParams) (int64, error) { + row := q.db.QueryRow(ctx, getTotalSlackQueriesResolved, arg.WorkspaceID, arg.Column2, arg.Column3) + var count int64 + err := row.Scan(&count) + return count, err +} diff --git a/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/query.sql b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/query.sql new file mode 100644 index 0000000000..3aa8ae1ca6 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/query.sql @@ -0,0 +1,22 @@ +-- name: GetTotalSlackQueries :one +SELECT + COUNT(*) AS count +FROM astoria.slack_feedback +WHERE astoria.slack_feedback.workspace_id = $1 +AND created_at BETWEEN $2::date AND $3::date; + +-- name: GetTotalSlackQueriesResolved :one +SELECT + COUNT(*) AS count +FROM astoria.slack_feedback +WHERE astoria.slack_feedback.workspace_id = $1 + AND (issue_raised = false OR issue_raised IS NULL) + AND created_at BETWEEN $2::date AND $3::date; + +-- name: GetTotalSlackQueriesRequestsCreated :one +SELECT + COUNT(*) AS count +FROM astoria.tickets +WHERE astoria.tickets.workspace_id = $1 + AND source = 'RAISED_FROM_BOT' + AND created_at BETWEEN $2::date AND $3::date; diff --git a/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/schema.sql b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..48ccc12b84 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/schema.sql @@ -0,0 +1,15 @@ +CREATE SCHEMA astoria; + +CREATE TABLE astoria.slack_feedback ( + id BIGSERIAL PRIMARY KEY, + workspace_id BIGINT NOT NULL, + created_at TIMESTAMP NOT NULL, + issue_raised BOOLEAN +); + +CREATE TABLE astoria.tickets ( + id BIGSERIAL PRIMARY KEY, + workspace_id BIGINT NOT NULL, + created_at TIMESTAMP NOT NULL, + source text NOT NULL +); diff --git a/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5dc63e3f91 --- /dev/null +++ b/internal/endtoend/testdata/schema_table_column_ref/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_column_cast/mysql/go/db.go b/internal/endtoend/testdata/select_column_cast/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 107ba794df..04bc70ad65 100644 --- a/internal/endtoend/testdata/select_column_cast/mysql/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } 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 59a52d39df..bfe7263f56 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 107ba794df..04bc70ad65 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } 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 ea11a1522a..0840542975 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 107ba794df..04bc70ad65 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } 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 ea11a1522a..0840542975 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 107ba794df..04bc70ad65 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar bool } 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 9ded13b556..8e24d6bb96 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 90b4584f2c..0cd442222e 100644 --- a/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_column_cast/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Bar string } 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 82fa72f2e2..1ecd627432 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/select_cte/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_cte/sqlite/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 2b59cc4ccb..672d639af9 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 31300c7580..91dd1c85fd 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.23.0 +// sqlc v1.30.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 589e84cd9b..6ff3d6e3e5 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0f33cc6c15..2e5e0b9352 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.23.0 +// sqlc v1.30.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 589e84cd9b..6ff3d6e3e5 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 31300c7580..91dd1c85fd 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.23.0 +// sqlc v1.30.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 907f8e87fc..c1d4f2ef06 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_empty_column_list/mysql/query.sql b/internal/endtoend/testdata/select_empty_column_list/mysql/query.sql index 81b6ff14a1..ae6cd0c9be 100644 --- a/internal/endtoend/testdata/select_empty_column_list/mysql/query.sql +++ b/internal/endtoend/testdata/select_empty_column_list/mysql/query.sql @@ -1,4 +1,2 @@ -CREATE TABLE bar (name text); - -- name: GetBars :many -SELECT FROM bar; \ No newline at end of file +SELECT FROM bar; diff --git a/internal/endtoend/testdata/select_empty_column_list/mysql/schema.sql b/internal/endtoend/testdata/select_empty_column_list/mysql/schema.sql new file mode 100644 index 0000000000..fb18b4b3a8 --- /dev/null +++ b/internal/endtoend/testdata/select_empty_column_list/mysql/schema.sql @@ -0,0 +1 @@ +CREATE TABLE bar (name text); diff --git a/internal/endtoend/testdata/select_empty_column_list/mysql/sqlc.json b/internal/endtoend/testdata/select_empty_column_list/mysql/sqlc.json index 445bbd1589..e41c39e8b3 100644 --- a/internal/endtoend/testdata/select_empty_column_list/mysql/sqlc.json +++ b/internal/endtoend/testdata/select_empty_column_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/select_empty_column_list/mysql/stderr.txt b/internal/endtoend/testdata/select_empty_column_list/mysql/stderr.txt index 11aeb304b0..2744126cd0 100644 --- a/internal/endtoend/testdata/select_empty_column_list/mysql/stderr.txt +++ b/internal/endtoend/testdata/select_empty_column_list/mysql/stderr.txt @@ -1,2 +1,2 @@ # package querytest -query.sql:4:12: syntax error near "FROM bar;" " +query.sql:2:12: syntax error near "FROM bar;" 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 31300c7580..91dd1c85fd 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.23.0 +// sqlc v1.30.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 a14f171780..c7ebc00934 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 0f33cc6c15..2e5e0b9352 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.23.0 +// sqlc v1.30.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 a14f171780..c7ebc00934 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 31300c7580..91dd1c85fd 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.23.0 +// sqlc v1.30.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 7bdbdba1ee..288c4e4c11 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/select_exists/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 2434e744aa..f7903b1f2b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/select_exists/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 2434e744aa..f7903b1f2b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/select_exists/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_exists/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 83b0c255e1..e22e5b6f33 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/select_exists/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_exists/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 832c0a8e7f..fa42d32f60 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 ebb49d9a05..eabb4ea4eb 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.23.0 +// sqlc v1.30.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 a4b4650a4a..4a8ebb36b6 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2ea8889083..ef22c3818c 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.23.0 +// sqlc v1.30.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 8ea07ccca6..2b61d10df1 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 2ea8889083..ef22c3818c 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.23.0 +// sqlc v1.30.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 ad045c9209..056d67dbce 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 adc25749ea..670033a63c 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.23.0 +// sqlc v1.30.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 4b656541d5..d499f076e4 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2ea8889083..ef22c3818c 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.23.0 +// sqlc v1.30.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 3b1f5ad79f..0ddc5a11e1 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2ea8889083..ef22c3818c 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.23.0 +// sqlc v1.30.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 6547d55014..c4064b2c6e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a7787232e3..ff7cddbbb4 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.23.0 +// sqlc v1.30.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 d36de18bd4..613933c70c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a7787232e3..ff7cddbbb4 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.23.0 +// sqlc v1.30.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 d36de18bd4..613933c70c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a7787232e3..ff7cddbbb4 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.23.0 +// sqlc v1.30.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 d36de18bd4..613933c70c 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 646f588a66..f9e0b3050d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 646f588a66..f9e0b3050d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0904aa73ce..1344b5dab9 100644 --- a/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go +++ b/internal/endtoend/testdata/select_not_exists/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int64 } 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 29da27c163..ee1b8e548b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_not_exists/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 713879b5ee..c1d20849df 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index e567f3762b..02e74b6afb 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 fd6df7f234..f5668bd976 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.23.0 +// sqlc v1.30.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 8dbfd935bc..dd10b59022 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 fd6df7f234..f5668bd976 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.23.0 +// sqlc v1.30.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 fdc89398c5..3259c4c82c 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f7140f29a2..f68e9f60b9 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.23.0 +// sqlc v1.30.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 fdc89398c5..3259c4c82c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 fd6df7f234..f5668bd976 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.23.0 +// sqlc v1.30.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 8dbfd935bc..dd10b59022 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 933482678c..dfbb4f7e0b 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.23.0 +// sqlc v1.30.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 0279180f28..2c899f8fa9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d75971d570..653314bea2 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.23.0 +// sqlc v1.30.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 f37dbb3089..8dcc27892e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 ff24fa37bd..aefe0b5dcd 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.23.0 +// sqlc v1.30.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 d47355771d..14fea519b9 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 67f9be2e4d..a77b945927 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.23.0 +// sqlc v1.30.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 60593cc7bc..f67bea811f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 ff24fa37bd..aefe0b5dcd 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.23.0 +// sqlc v1.30.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 2aa1ec3685..4023181a3a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d9c6fe065e..f72a5da135 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.23.0 +// sqlc v1.30.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 42758a5fd9..1e25e8a86a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 2c627fdd37..9ce044a0b0 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.23.0 +// sqlc v1.30.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 f1ce517814..9510db3a68 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/db.go b/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_no_alias/mysql/go/models.go b/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/models.go new file mode 100644 index 0000000000..a7e45a1d4e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Foo struct { + A int32 + Name sql.NullString +} diff --git a/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/query.sql.go b/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/query.sql.go new file mode 100644 index 0000000000..6e7e214b72 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/mysql/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const subquery = `-- name: Subquery :many +SELECT a, name FROM (SELECT a, name FROM foo) +` + +func (q *Queries) Subquery(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, subquery) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.Name); 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_no_alias/mysql/query.sql b/internal/endtoend/testdata/select_subquery_no_alias/mysql/query.sql new file mode 100644 index 0000000000..87477e34ca --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/mysql/query.sql @@ -0,0 +1,2 @@ +-- name: Subquery :many +SELECT * FROM (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/select_subquery_no_alias/mysql/schema.sql b/internal/endtoend/testdata/select_subquery_no_alias/mysql/schema.sql new file mode 100644 index 0000000000..3d06ae047e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/mysql/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (a int not null, name text); diff --git a/internal/endtoend/testdata/select_subquery_no_alias/mysql/sqlc.yaml b/internal/endtoend/testdata/select_subquery_no_alias/mysql/sqlc.yaml new file mode 100644 index 0000000000..b843ef55e3 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/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_subquery_no_alias/postgres/stdlib/go/db.go b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_no_alias/postgres/stdlib/go/models.go b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/models.go new file mode 100644 index 0000000000..a7e45a1d4e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Foo struct { + A int32 + Name sql.NullString +} diff --git a/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/query.sql.go b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/query.sql.go new file mode 100644 index 0000000000..6e7e214b72 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const subquery = `-- name: Subquery :many +SELECT a, name FROM (SELECT a, name FROM foo) +` + +func (q *Queries) Subquery(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, subquery) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.Name); 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_no_alias/postgres/stdlib/query.sql b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/query.sql new file mode 100644 index 0000000000..87477e34ca --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/query.sql @@ -0,0 +1,2 @@ +-- name: Subquery :many +SELECT * FROM (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/schema.sql b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/schema.sql new file mode 100644 index 0000000000..3d06ae047e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (a int not null, name text); diff --git a/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/sqlc.yaml b/internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/sqlc.yaml new file mode 100644 index 0000000000..8c68222b49 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/postgres/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_no_alias/sqlite/go/db.go b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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_no_alias/sqlite/go/models.go b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/models.go new file mode 100644 index 0000000000..cd99e4407b --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/models.go @@ -0,0 +1,14 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Foo struct { + A int64 + Name sql.NullString +} diff --git a/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/query.sql.go b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/query.sql.go new file mode 100644 index 0000000000..6e7e214b72 --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/query.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" +) + +const subquery = `-- name: Subquery :many +SELECT a, name FROM (SELECT a, name FROM foo) +` + +func (q *Queries) Subquery(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, subquery) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.Name); 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_no_alias/sqlite/query.sql b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/query.sql new file mode 100644 index 0000000000..87477e34ca --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/query.sql @@ -0,0 +1,2 @@ +-- name: Subquery :many +SELECT * FROM (SELECT * FROM foo); diff --git a/internal/endtoend/testdata/select_subquery_no_alias/sqlite/schema.sql b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/schema.sql new file mode 100644 index 0000000000..3d06ae047e --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/schema.sql @@ -0,0 +1 @@ +CREATE TABLE foo (a int not null, name text); diff --git a/internal/endtoend/testdata/select_subquery_no_alias/sqlite/sqlc.yaml b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/sqlc.yaml new file mode 100644 index 0000000000..bd7419948d --- /dev/null +++ b/internal/endtoend/testdata/select_subquery_no_alias/sqlite/sqlc.yaml @@ -0,0 +1,10 @@ +version: "2" +sql: + - engine: "sqlite" + schema: "schema.sql" + queries: "query.sql" + gen: + go: + package: "querytest" + out: "go" + sql_package: "database/sql" diff --git a/internal/endtoend/testdata/select_system/pgx/go/db.go b/internal/endtoend/testdata/select_system/pgx/go/db.go index 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f8ec7240f3..50dff66166 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.23.0 +// sqlc v1.30.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 7dbcb6af98..cef462dc6f 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 b9a0b02545..1c26b31f26 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 b9a0b02545..1c26b31f26 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/select_text_array/stdlib/go/models.go +++ b/internal/endtoend/testdata/select_text_array/stdlib/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 2039b87cfb..eaf08b1bc5 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a2403eea1e..41f892cc4a 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.23.0 +// sqlc v1.30.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 6a11e34d6e..ce48f7b961 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -96,6 +96,35 @@ func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { return items, nil } +const selectUnionAliased = `-- name: SelectUnionAliased :many +(SELECT a, b FROM foo) +UNION +SELECT a, b FROM bar +` + +func (q *Queries) SelectUnionAliased(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, selectUnionAliased) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.B); 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 selectUnionOther = `-- name: SelectUnionOther :many SELECT a, b FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/mysql/query.sql b/internal/endtoend/testdata/select_union/mysql/query.sql index d607aa7222..c706921bc3 100644 --- a/internal/endtoend/testdata/select_union/mysql/query.sql +++ b/internal/endtoend/testdata/select_union/mysql/query.sql @@ -22,4 +22,9 @@ SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION -SELECT * FROM bar; \ No newline at end of file +SELECT * FROM bar; + +-- name: SelectUnionAliased :many +(SELECT * FROM foo) +UNION +SELECT * FROM bar; 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 a2403eea1e..41f892cc4a 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.23.0 +// sqlc v1.30.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 045ee773cc..253f792c55 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -87,6 +87,32 @@ func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { return items, nil } +const selectUnionAliased = `-- name: SelectUnionAliased :many +(SELECT a, b FROM foo) +UNION +SELECT a, b FROM foo +` + +func (q *Queries) SelectUnionAliased(ctx context.Context) ([]Foo, error) { + rows, err := q.db.Query(ctx, selectUnionAliased) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.B); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const selectUnionOther = `-- name: SelectUnionOther :many SELECT a, b FROM foo UNION 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 107aee02d2..f44f1fd2af 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql @@ -22,4 +22,9 @@ SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION -SELECT * FROM bar; \ No newline at end of file +SELECT * FROM bar; + +-- name: SelectUnionAliased :many +(SELECT * FROM foo) +UNION +SELECT * FROM foo; 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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8a0c345743..4d48e880e1 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.23.0 +// sqlc v1.30.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 045ee773cc..253f792c55 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -87,6 +87,32 @@ func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { return items, nil } +const selectUnionAliased = `-- name: SelectUnionAliased :many +(SELECT a, b FROM foo) +UNION +SELECT a, b FROM foo +` + +func (q *Queries) SelectUnionAliased(ctx context.Context) ([]Foo, error) { + rows, err := q.db.Query(ctx, selectUnionAliased) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.B); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const selectUnionOther = `-- name: SelectUnionOther :many SELECT a, b FROM foo UNION 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 107aee02d2..f44f1fd2af 100644 --- a/internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql +++ b/internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql @@ -22,4 +22,9 @@ SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION -SELECT * FROM bar; \ No newline at end of file +SELECT * FROM bar; + +-- name: SelectUnionAliased :many +(SELECT * FROM foo) +UNION +SELECT * FROM foo; 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a2403eea1e..41f892cc4a 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.23.0 +// sqlc v1.30.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 1131e07c53..827ee31c18 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -96,6 +96,35 @@ func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { return items, nil } +const selectUnionAliased = `-- name: SelectUnionAliased :many +(SELECT a, b FROM foo) +UNION +SELECT a, b FROM foo +` + +func (q *Queries) SelectUnionAliased(ctx context.Context) ([]Foo, error) { + rows, err := q.db.QueryContext(ctx, selectUnionAliased) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Foo + for rows.Next() { + var i Foo + if err := rows.Scan(&i.A, &i.B); 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 selectUnionOther = `-- name: SelectUnionOther :many SELECT a, b FROM foo UNION diff --git a/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql b/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql index 107aee02d2..f44f1fd2af 100644 --- a/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql +++ b/internal/endtoend/testdata/select_union/postgres/stdlib/query.sql @@ -22,4 +22,9 @@ SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION -SELECT * FROM bar; \ No newline at end of file +SELECT * FROM bar; + +-- name: SelectUnionAliased :many +(SELECT * FROM foo) +UNION +SELECT * FROM foo; diff --git a/internal/endtoend/testdata/select_union/sqlite/go/db.go b/internal/endtoend/testdata/select_union/sqlite/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a2403eea1e..41f892cc4a 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.23.0 +// sqlc v1.30.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 11323a989d..863e55fa04 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/select_union/sqlite/query.sql b/internal/endtoend/testdata/select_union/sqlite/query.sql index d607aa7222..67d28d1824 100644 --- a/internal/endtoend/testdata/select_union/sqlite/query.sql +++ b/internal/endtoend/testdata/select_union/sqlite/query.sql @@ -22,4 +22,4 @@ SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION -SELECT * FROM bar; \ No newline at end of file +SELECT * FROM bar; 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 504c035243..ec1cb8d670 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.23.0 +// sqlc v1.30.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 fc4196d175..affaa7cdd1 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 c8fd915c47..0b43a03de8 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.23.0 +// sqlc v1.30.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 ed7708e674..f960e1cbd9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/selectstatic/mysql/go/models.go b/internal/endtoend/testdata/selectstatic/mysql/go/models.go index eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/selectstatic/mysql/go/models.go +++ b/internal/endtoend/testdata/selectstatic/mysql/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () diff --git a/internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go b/internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go index 4373f3970d..c6cfed9b63 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 100644 --- a/internal/endtoend/testdata/show_warnings/mysql/go/models.go +++ b/internal/endtoend/testdata/show_warnings/mysql/go/models.go @@ -1,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 284cbdcbcb..00482e19f3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 920068e2d6..76309f48ac 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.23.0 +// sqlc v1.30.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 561af917f2..e3ba139207 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql b/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql index 376329e101..2f49d219f3 100644 --- a/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql +++ b/internal/endtoend/testdata/single_param_conflict/mysql/schema.sql @@ -7,5 +7,5 @@ CREATE TABLE authors ( -- https://github.com/sqlc-dev/sqlc/issues/1290 CREATE TABLE users ( - sub TEXT PRIMARY KEY + sub VARCHAR(10) PRIMARY KEY ); 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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 609ff4e265..e42f868a67 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.23.0 +// sqlc v1.30.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 a8e609830e..1912659d8b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 e4c944861d..29daab34db 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.23.0 +// sqlc v1.30.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 13229971bd..daa903d8c2 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 609ff4e265..e42f868a67 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.23.0 +// sqlc v1.30.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 b5a52890d8..0b99078536 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 920068e2d6..76309f48ac 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.23.0 +// sqlc v1.30.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 561af917f2..e3ba139207 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 eea086ca45..e0766794c9 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 eea086ca45..e0766794c9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 eed0833f5a..333ea43ea3 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,7 +1,5 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest - -import () 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 fca4e07ea1..76911da54c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 65b4ccb60d..d870bb7cde 100644 --- a/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string } 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 9ea7312577..ae033111a2 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 65b4ccb60d..d870bb7cde 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string } 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 0cdf72891e..1329a6e015 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 65b4ccb60d..d870bb7cde 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string } 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 0cdf72891e..1329a6e015 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 65b4ccb60d..d870bb7cde 100644 --- a/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string } 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 75140d4284..f7b36b5389 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 65b4ccb60d..d870bb7cde 100644 --- a/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go +++ b/internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string } 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 bea690a486..1ed076d63e 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/query.sql b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/query.sql index 3e46d7204b..80d171b2c2 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/query.sql +++ b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/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/mysql/schema.sql b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/schema.sql new file mode 100644 index 0000000000..b11bfef310 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE users ( + id serial, + first_name text not null +); diff --git a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/sqlc.json b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/sqlc.json index bfbd23e211..a9e7b055a4 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/sqlc.json +++ b/internal/endtoend/testdata/sqlc_arg_invalid/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/sqlc_arg_invalid/mysql/stderr.txt b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt index be38c8b505..73966182fb 100644 --- a/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt +++ b/internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt @@ -1,6 +1,6 @@ # 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: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 +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_embed/mysql/exec.json b/internal/endtoend/testdata/sqlc_embed/mysql/exec.json new file mode 100644 index 0000000000..c85ca2dfa7 --- /dev/null +++ b/internal/endtoend/testdata/sqlc_embed/mysql/exec.json @@ -0,0 +1,6 @@ +{ + "contexts": ["base"], + "meta": { + "invalid_schema": true + } +} diff --git a/internal/endtoend/testdata/sqlc_embed/mysql/go/db.go b/internal/endtoend/testdata/sqlc_embed/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b810735e37..ca7ee22488 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.23.0 +// sqlc v1.30.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 031f39408f..09f901c7b3 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 e66d752446..ae771b23ab 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.23.0 +// sqlc v1.30.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 d58781d301..643d5d41d6 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d6332ca0bb..401fe50193 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.23.0 +// sqlc v1.30.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 8376b08f96..460f8fe490 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 a75996a094..f261202cb1 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.23.0 +// sqlc v1.30.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 2f4205b76b..aafc0897a8 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b9a11a0a9a..040ef7a0ac 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.23.0 +// sqlc v1.30.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 2dbc60914d..1cba711a58 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 b9a11a0a9a..040ef7a0ac 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.23.0 +// sqlc v1.30.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 8e6c78ddf7..a2cff4e894 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 aa6dd06121..9875c2fc16 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.23.0 +// sqlc v1.30.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 6ee405e390..21e8482afc 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b9a11a0a9a..040ef7a0ac 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.23.0 +// sqlc v1.30.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 1143e05d78..f83af91b6b 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.23.0 +// sqlc v1.30.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 e67fb1647e..2a33033883 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.23.0 +// sqlc v1.30.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 4425fc56cc..d8f6d919d7 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.23.0 +// sqlc v1.30.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 8a0ee7b83a..a9126fa18f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 b9a11a0a9a..040ef7a0ac 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.23.0 +// sqlc v1.30.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 ad78d120ca..c603bcd4ab 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 0021e15f0c..77be1976cf 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.23.0 +// sqlc v1.30.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 1e6ed9702a..72d5617d0a 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 65b4ccb60d..eeaab97b8d 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go @@ -1,11 +1,10 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { + ID int32 Name string } 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 0cdf72891e..2def271737 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest @@ -11,10 +11,16 @@ import ( const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = $1 + AND id IN ($2) ` -func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, error) { - rows, err := q.db.Query(ctx, funcParamIdent, slug) +type FuncParamIdentParams struct { + Slug string + Favourites []int32 +} + +func (q *Queries) FuncParamIdent(ctx context.Context, arg FuncParamIdentParams) ([]string, error) { + rows, err := q.db.Query(ctx, funcParamIdent, arg.Slug, arg.Favourites) if err != nil { return nil, err } @@ -35,10 +41,16 @@ func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, er const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = $1 + AND id IN ($2) ` -func (q *Queries) FuncParamString(ctx context.Context, slug string) ([]string, error) { - rows, err := q.db.Query(ctx, funcParamString, slug) +type FuncParamStringParams struct { + Slug string + Favourites []int32 +} + +func (q *Queries) FuncParamString(ctx context.Context, arg FuncParamStringParams) ([]string, error) { + rows, err := q.db.Query(ctx, funcParamString, arg.Slug, arg.Favourites) if err != nil { return nil, err } diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql index 2dfaa9cd5c..2a5fccf1fc 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql @@ -1,5 +1,7 @@ -- name: FuncParamIdent :many -SELECT name FROM foo WHERE name = sqlc.arg(slug); +SELECT name FROM foo WHERE name = sqlc.arg(slug) + AND id IN (sqlc.slice(favourites)); -- name: FuncParamString :many -SELECT name FROM foo WHERE name = sqlc.arg('slug'); +SELECT name FROM foo WHERE name = sqlc.arg('slug') + AND id IN (sqlc.slice('favourites')); diff --git a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql index ec46e55ccb..43e6433e30 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql @@ -1,2 +1,2 @@ -CREATE TABLE foo (name text not null); +CREATE TABLE foo (id int not null, name text not null); 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 abdfd89170..eeaab97b8d 100644 --- a/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID int32 Name string 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 8abbde023c..4463788192 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 08486e1325..392b1ce49b 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.23.0 +// sqlc v1.30.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 88d63f8b65..ff3ae7f5ff 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.23.0 +// sqlc v1.30.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 1889c768f9..f4a04e4acd 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.23.0 +// sqlc v1.30.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 08486e1325..392b1ce49b 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.23.0 +// sqlc v1.30.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 5e9289db73..af519ba1e8 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/sqlite_skip_todo/db/db.go b/internal/endtoend/testdata/sqlite_skip_todo/db/db.go new file mode 100644 index 0000000000..cd5bbb8e08 --- /dev/null +++ b/internal/endtoend/testdata/sqlite_skip_todo/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/sqlite_skip_todo/db/models.go b/internal/endtoend/testdata/sqlite_skip_todo/db/models.go new file mode 100644 index 0000000000..69bf4b51b6 --- /dev/null +++ b/internal/endtoend/testdata/sqlite_skip_todo/db/models.go @@ -0,0 +1,13 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package db + +import ( + "database/sql" +) + +type Foo struct { + Bar sql.NullString +} diff --git a/internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go b/internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go new file mode 100644 index 0000000000..5bc1ee784c --- /dev/null +++ b/internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go @@ -0,0 +1,66 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package db + +import ( + "context" + "database/sql" +) + +const getFoo = `-- name: GetFoo :many +SELECT bar FROM foo +WHERE bar = ? +` + +func (q *Queries) GetFoo(ctx context.Context, bar sql.NullString) ([]sql.NullString, error) { + rows, err := q.db.QueryContext(ctx, getFoo, bar) + if err != nil { + return nil, err + } + defer rows.Close() + var items []sql.NullString + for rows.Next() { + var bar sql.NullString + if err := rows.Scan(&bar); err != nil { + return nil, err + } + items = append(items, bar) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listFoo = `-- name: ListFoo :many +SELECT bar FROM foo +` + +func (q *Queries) ListFoo(ctx context.Context) ([]sql.NullString, error) { + rows, err := q.db.QueryContext(ctx, listFoo) + if err != nil { + return nil, err + } + defer rows.Close() + var items []sql.NullString + for rows.Next() { + var bar sql.NullString + if err := rows.Scan(&bar); err != nil { + return nil, err + } + items = append(items, bar) + } + 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/sqlite_skip_todo/query.sql b/internal/endtoend/testdata/sqlite_skip_todo/query.sql new file mode 100644 index 0000000000..e51c45c8c1 --- /dev/null +++ b/internal/endtoend/testdata/sqlite_skip_todo/query.sql @@ -0,0 +1,16 @@ +-- name: PragmaForeignKeysEnable :exec +PRAGMA foreign_keys = 1; + +-- name: ListFoo :many +SELECT * FROM foo; + +-- name: PragmaForeignKeysDisable :exec +PRAGMA foreign_keys = 0; + +-- name: PragmaForeignKeysGet :one +PRAGMA foreign_keys; + +-- name: GetFoo :many +SELECT * FROM foo +WHERE bar = ?; + diff --git a/internal/endtoend/testdata/sqlite_skip_todo/schema.sql b/internal/endtoend/testdata/sqlite_skip_todo/schema.sql new file mode 100644 index 0000000000..010d09e16f --- /dev/null +++ b/internal/endtoend/testdata/sqlite_skip_todo/schema.sql @@ -0,0 +1,3 @@ +CREATE TABLE foo ( + bar text +); diff --git a/internal/endtoend/testdata/sqlite_skip_todo/sqlc.json b/internal/endtoend/testdata/sqlite_skip_todo/sqlc.json new file mode 100644 index 0000000000..cbd787d930 --- /dev/null +++ b/internal/endtoend/testdata/sqlite_skip_todo/sqlc.json @@ -0,0 +1,16 @@ +{ + "version": "2", + "sql": [ + { + "engine": "sqlite", + "queries": "query.sql", + "schema": "schema.sql", + "gen": { + "go": { + "package": "db", + "out": "db" + } + } + } + ] +} 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3fd9ccb326..9a7d98ae0c 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.23.0 +// sqlc v1.30.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 6a2223340d..a805253f1b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 4f428a914d..0f1f3f6658 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 f438af367d..f3e0c2094b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 ce8c7d1453..3ee86d8810 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.23.0 +// sqlc v1.30.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 db08a5fdf5..f30529e266 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 38432fd552..a9484ac78f 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 38432fd552..a9484ac78f 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 76aa44e8c2..897f99f876 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8214f1758d..0df50c9ca2 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.23.0 +// sqlc v1.30.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 23d7e87555..cb49d0ecca 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 bfb4975d86..b9de05170d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 2d5c6741f5..53c5c498a6 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.23.0 +// sqlc v1.30.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 8498321bad..490760a235 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 0360360677..bff7a6caac 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8214f1758d..0df50c9ca2 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.23.0 +// sqlc v1.30.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 023060fc45..e4fa778124 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 1012661839..7dd824b9d0 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 c03f0b0e30..6bbaa96959 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 c808f70a7c..7d631caa11 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 8214f1758d..0df50c9ca2 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.23.0 +// sqlc v1.30.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 e299ea74b2..52832a0fa9 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 8f7430056a..ba8c0a9c1d 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.23.0 +// sqlc v1.30.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 c03f0b0e30..6bbaa96959 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 68ed8c4a3f..7d67becd1c 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.23.0 +// sqlc v1.30.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 da720270b0..d644aa972b 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 68ed8c4a3f..7d67becd1c 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.23.0 +// sqlc v1.30.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 e5a8fb84aa..4fa961bbc6 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 b5b3ce9eae..526beb2de2 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.23.0 +// sqlc v1.30.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 e5a8fb84aa..4fa961bbc6 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 68ed8c4a3f..7d67becd1c 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.23.0 +// sqlc v1.30.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 7a4043331c..bbc49099eb 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9ddbe3e821..1551cdb9d1 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.23.0 +// sqlc v1.30.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 db4c6191bd..ffd6da5afc 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 6c161550e6..f00d659c95 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 4f83fece93..eee7e0b9a5 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 ce8c7d1453..3ee86d8810 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.23.0 +// sqlc v1.30.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 4f83fece93..eee7e0b9a5 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf7cd1be03..de35bade9f 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.23.0 +// sqlc v1.30.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 6c161550e6..f00d659c95 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 814e816000..530968fc6b 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.23.0 +// sqlc v1.30.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 ec68197958..769c49f53c 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 814e816000..530968fc6b 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.23.0 +// sqlc v1.30.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 62ff5884d9..ae4c42a967 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 a1eb2a422f..95e7754cd6 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.23.0 +// sqlc v1.30.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 62ff5884d9..ae4c42a967 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 814e816000..530968fc6b 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.23.0 +// sqlc v1.30.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 ec68197958..769c49f53c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 d66faef7a8..2d8fab6f2f 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.23.0 +// sqlc v1.30.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 02d86c1194..6dbafb8f41 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 69a6d1cd7e..605dd34145 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.23.0 +// sqlc v1.30.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 5930cb0070..1efbbbe147 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 1e5347691d..c871303d2d 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.23.0 +// sqlc v1.30.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 ccf5ecd5f9..a8f159ee8a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 f77d0a6ca6..10e1baa1e3 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Transaction struct { ID int64 Uri string 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 6228908f32..bb2e0fea33 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 3a2ed134cf..6a505de96b 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.23.0 +// sqlc v1.30.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 bfadbced34..a3d4157ab5 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 84df65da18..7005f62ee8 100644 --- a/internal/endtoend/testdata/table_function/sqlite/go/models.go +++ b/internal/endtoend/testdata/table_function/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Transaction struct { Uri string ProgramID string 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 bcfb85158d..b4f04af9a0 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/db.go b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/db.go new file mode 100644 index 0000000000..3b320aa168 --- /dev/null +++ b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/table_name_case_sensitivity/sqlite/go/models.go b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/models.go new file mode 100644 index 0000000000..b074ef45c0 --- /dev/null +++ b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/models.go @@ -0,0 +1,24 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package querytest + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name sql.NullString +} + +type Book struct { + ID int64 + Title sql.NullString +} + +type User struct { + ID int64 + Name sql.NullString +} diff --git a/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/query.sql.go b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/query.sql.go new file mode 100644 index 0000000000..1e7221315b --- /dev/null +++ b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/query.sql.go @@ -0,0 +1,183 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package querytest + +import ( + "context" + "database/sql" +) + +const deleteAuthor = `-- name: DeleteAuthor :exec +DELETE FROM "Authors" WHERE id = ? +` + +func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteAuthor, id) + return err +} + +const deleteBook = `-- name: DeleteBook :exec +DELETE FROM Books WHERE id = ? +` + +func (q *Queries) DeleteBook(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteBook, id) + return err +} + +const deleteUser = `-- name: DeleteUser :exec +DELETE FROM users WHERE id = ? +` + +func (q *Queries) DeleteUser(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteUser, id) + return err +} + +const deleteUserMixedCase = `-- name: DeleteUserMixedCase :exec +DELETE FROM users WHERE id = ? +` + +func (q *Queries) DeleteUserMixedCase(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteUserMixedCase, id) + return err +} + +const getAuthor = `-- name: GetAuthor :one +SELECT id, name FROM "Authors" WHERE id = ? +` + +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) + return i, err +} + +const getBook = `-- name: GetBook :one +SELECT id, title FROM Books WHERE id = ? +` + +func (q *Queries) GetBook(ctx context.Context, id int64) (Book, error) { + row := q.db.QueryRowContext(ctx, getBook, id) + var i Book + err := row.Scan(&i.ID, &i.Title) + return i, err +} + +const getUser = `-- name: GetUser :one +SELECT id, name FROM users WHERE id = ? +` + +func (q *Queries) GetUser(ctx context.Context, id int64) (User, error) { + row := q.db.QueryRowContext(ctx, getUser, id) + var i User + err := row.Scan(&i.ID, &i.Name) + return i, err +} + +const getUserMixedCase = `-- name: GetUserMixedCase :one +SELECT id, name FROM users WHERE id = ? +` + +func (q *Queries) GetUserMixedCase(ctx context.Context, id int64) (User, error) { + row := q.db.QueryRowContext(ctx, getUserMixedCase, id) + var i User + err := row.Scan(&i.ID, &i.Name) + return i, err +} + +const insertAuthor = `-- name: InsertAuthor :exec +INSERT INTO "Authors" (name) VALUES (?) +` + +func (q *Queries) InsertAuthor(ctx context.Context, name sql.NullString) error { + _, err := q.db.ExecContext(ctx, insertAuthor, name) + return err +} + +const insertBook = `-- name: InsertBook :exec +INSERT INTO Books (title) VALUES (?) +` + +func (q *Queries) InsertBook(ctx context.Context, title sql.NullString) error { + _, err := q.db.ExecContext(ctx, insertBook, title) + return err +} + +const insertUser = `-- name: InsertUser :exec +INSERT INTO users (name) VALUES (?) +` + +func (q *Queries) InsertUser(ctx context.Context, name sql.NullString) error { + _, err := q.db.ExecContext(ctx, insertUser, name) + return err +} + +const insertUserMixedCase = `-- name: InsertUserMixedCase :exec +INSERT INTO users (name) VALUES (?) +` + +func (q *Queries) InsertUserMixedCase(ctx context.Context, name sql.NullString) error { + _, err := q.db.ExecContext(ctx, insertUserMixedCase, name) + return err +} + +const updateAuthor = `-- name: UpdateAuthor :exec +UPDATE "Authors" SET name = ? WHERE id = ? +` + +type UpdateAuthorParams struct { + Name sql.NullString + ID int64 +} + +func (q *Queries) UpdateAuthor(ctx context.Context, arg UpdateAuthorParams) error { + _, err := q.db.ExecContext(ctx, updateAuthor, arg.Name, arg.ID) + return err +} + +const updateBook = `-- name: UpdateBook :exec +UPDATE Books SET title = ? WHERE id = ? +` + +type UpdateBookParams struct { + Title sql.NullString + ID int64 +} + +func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error { + _, err := q.db.ExecContext(ctx, updateBook, arg.Title, arg.ID) + return err +} + +const updateUser = `-- name: UpdateUser :exec +UPDATE users SET name = ? WHERE id = ? +` + +type UpdateUserParams struct { + Name sql.NullString + ID int64 +} + +func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error { + _, err := q.db.ExecContext(ctx, updateUser, arg.Name, arg.ID) + return err +} + +const updateUserMixedCase = `-- name: UpdateUserMixedCase :exec +UPDATE users SET name = ? WHERE id = ? +` + +type UpdateUserMixedCaseParams struct { + Name sql.NullString + ID int64 +} + +func (q *Queries) UpdateUserMixedCase(ctx context.Context, arg UpdateUserMixedCaseParams) error { + _, err := q.db.ExecContext(ctx, updateUserMixedCase, arg.Name, arg.ID) + return err +} diff --git a/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/query.sql b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/query.sql new file mode 100644 index 0000000000..6312be57a5 --- /dev/null +++ b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/query.sql @@ -0,0 +1,47 @@ +-- name: InsertUser :exec +INSERT INTO users (name) VALUES (?); + +-- name: InsertUserMixedCase :exec +INSERT INTO users (name) VALUES (?); + +-- name: InsertAuthor :exec +INSERT INTO "Authors" (name) VALUES (?); + +-- name: InsertBook :exec +INSERT INTO Books (title) VALUES (?); + +-- name: UpdateUser :exec +UPDATE users SET name = ? WHERE id = ?; + +-- name: UpdateUserMixedCase :exec +UPDATE users SET name = ? WHERE id = ?; + +-- name: UpdateAuthor :exec +UPDATE "Authors" SET name = ? WHERE id = ?; + +-- name: UpdateBook :exec +UPDATE Books SET title = ? WHERE id = ?; + +-- name: DeleteUser :exec +DELETE FROM users WHERE id = ?; + +-- name: DeleteUserMixedCase :exec +DELETE FROM users WHERE id = ?; + +-- name: DeleteAuthor :exec +DELETE FROM "Authors" WHERE id = ?; + +-- name: DeleteBook :exec +DELETE FROM Books WHERE id = ?; + +-- name: GetUser :one +SELECT * FROM users WHERE id = ?; + +-- name: GetUserMixedCase :one +SELECT * FROM users WHERE id = ?; + +-- name: GetAuthor :one +SELECT * FROM "Authors" WHERE id = ?; + +-- name: GetBook :one +SELECT * FROM Books WHERE id = ?; diff --git a/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/schema.sql b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/schema.sql new file mode 100644 index 0000000000..3c43ae1d5d --- /dev/null +++ b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/schema.sql @@ -0,0 +1,13 @@ +-- Test table name case sensitivity handling across different SQLite operations +-- Create tables with different case patterns to verify consistent name resolution +CREATE TABLE users (id integer primary key, name text); +CREATE TABLE "Authors" (id integer primary key, name text); +CREATE TABLE Books (id integer primary key, title text); + +-- Create a temporary table to test drop operations +CREATE TABLE temp_orders (id integer primary key); +DROP TABLE temp_orders; + +-- Create another temp table with quoted identifier +CREATE TABLE "temp_products" (id integer primary key); +DROP TABLE "temp_products"; diff --git a/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/sqlc.json b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/sqlc.json new file mode 100644 index 0000000000..cd66df063b --- /dev/null +++ b/internal/endtoend/testdata/table_name_case_sensitivity/sqlite/sqlc.json @@ -0,0 +1,12 @@ +{ + "version": "1", + "packages": [ + { + "path": "go", + "engine": "sqlite", + "name": "querytest", + "schema": "schema.sql", + "queries": "query.sql" + } + ] +} diff --git a/internal/endtoend/testdata/truncate/mysql/go/db.go b/internal/endtoend/testdata/truncate/mysql/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/truncate/mysql/go/models.go b/internal/endtoend/testdata/truncate/mysql/go/models.go index da0f666392..65820844a6 100644 --- a/internal/endtoend/testdata/truncate/mysql/go/models.go +++ b/internal/endtoend/testdata/truncate/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID uint64 } diff --git a/internal/endtoend/testdata/truncate/mysql/go/query.sql.go b/internal/endtoend/testdata/truncate/mysql/go/query.sql.go index 9d57bdb358..d465593707 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 2126b0c801..5aea7ce64e 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 2126b0c801..5aea7ce64e 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cc9efa7dc8..4f106ee2e3 100644 --- a/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Bar struct { ID int32 } 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 9d57bdb358..d465593707 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 046634b292..80f5f51c7d 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.23.0 +// sqlc v1.30.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 b12d17b5d1..60fa5945ab 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 a3db450ade..b9b343e131 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go +++ b/internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 a3db450ade..b9b343e131 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 9f5bd4ebb2..ef6e41447e 100644 --- a/internal/endtoend/testdata/unknown_func/stdlib/go/models.go +++ b/internal/endtoend/testdata/unknown_func/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID string } 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 2b0968f3ba..d88d6d8275 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 458906b80d..746156964b 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.23.0 +// sqlc v1.30.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 1254353c0c..e461e469a0 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.23.0 +// sqlc v1.30.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 a9e77f35d4..072b4f06e8 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 4c9f5ce6d5..4d78ae55e9 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.23.0 +// sqlc v1.30.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 2d2dbe6b46..8f057d9828 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.23.0 +// sqlc v1.30.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 f6b7a7b25d..3e8cfe29e3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 458906b80d..746156964b 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.23.0 +// sqlc v1.30.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 1254353c0c..e461e469a0 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.23.0 +// sqlc v1.30.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 d0e0b82239..97e187cc9a 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 044fa0f1cd..63f98719bf 100644 --- a/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go +++ b/internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Item struct { 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 index 175e37702a..9cfcf1b136 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 cf6834c731..2067e59942 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type ArrayValue struct { ID int64 Values []string 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 6f98a53111..8bcd972db9 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.23.0 +// sqlc v1.30.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 ad315e4c44..d1621e11fd 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 cf6834c731..2067e59942 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type ArrayValue struct { ID int64 Values []string 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 6f98a53111..8bcd972db9 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.23.0 +// sqlc v1.30.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 ad315e4c44..d1621e11fd 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 cf6834c731..2067e59942 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type ArrayValue struct { ID int64 Values []string 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 6f98a53111..8bcd972db9 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.23.0 +// sqlc v1.30.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 5bba7d7410..2f62f8bb0d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 6dce4c6f5b..1ff011b819 100644 --- a/internal/endtoend/testdata/unsigned_params/mysql/go/models.go +++ b/internal/endtoend/testdata/unsigned_params/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { ID uint32 } 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 1b9de96b8a..3654e5f7c5 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 9cab6f5b49..9f53e22d22 100644 --- a/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go +++ b/internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package db -import () - type Repro struct { ID interface{} Name interface{} 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 7721f67e43..c0f28e53c1 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 d4cc156561..6db1df433c 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.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 index 09e384d61b..2533a1908e 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 f480168303..fda938bb99 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.23.0 +// sqlc v1.30.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 8faa446e63..4a5e6b409b 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 dfa13f1f47..5f27f6c6bd 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.23.0 +// sqlc v1.30.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 fd32291e3c..90b9f28d34 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 f480168303..fda938bb99 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.23.0 +// sqlc v1.30.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 3a090b003d..cc8ead4fe5 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 9145e2bc2d..41e5cc60de 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.23.0 +// sqlc v1.30.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 9b0ac7c29b..e214c2599e 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 b1decfcc96..ebf0df7b7b 100644 --- a/internal/endtoend/testdata/update_join/mysql/db/models.go +++ b/internal/endtoend/testdata/update_join/mysql/db/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package db -import () - type JoinTable struct { ID uint64 PrimaryTableID uint64 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 b43d42a428..3d27f3eb47 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.23.0 +// sqlc v1.30.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 4485929884..cd5bbb8e08 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.23.0 +// sqlc v1.30.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 fdefd769d5..0e93ad23ba 100644 --- a/internal/endtoend/testdata/update_join/postgresql/db/models.go +++ b/internal/endtoend/testdata/update_join/postgresql/db/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package db -import () - type JoinTable struct { ID int32 PrimaryTableID int32 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 249329557c..f1da19118a 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 100644 --- a/internal/endtoend/testdata/update_set/myql/go/models.go +++ b/internal/endtoend/testdata/update_set/myql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 a3befa38b6..99f8a5cbad 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 d45f23bb50..a392f8a4d3 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 d45f23bb50..a392f8a4d3 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 100644 --- a/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go +++ b/internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 2d0549f28a..bc6bce3952 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 100644 --- a/internal/endtoend/testdata/update_set/sqlite/go/models.go +++ b/internal/endtoend/testdata/update_set/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 a3befa38b6..99f8a5cbad 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 100644 --- a/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/mysql/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 c7f9fe0744..7337a63ee1 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.23.0 +// sqlc v1.30.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 4bd74b5169..3895084dc3 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 2fac4884b2..80f80a3d4d 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.23.0 +// sqlc v1.30.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 2568532b61..1e00549714 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 2fac4884b2..80f80a3d4d 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 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,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 9e57587e58..10dc784a4c 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 61e095a575..ee2c5c5577 100644 --- a/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go +++ b/internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Foo struct { Name string Slug string 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 c7f9fe0744..7337a63ee1 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 6cb442c290..9caf3b15cb 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.23.0 +// sqlc v1.30.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 9cd05924aa..2415782612 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.0 package querytest diff --git a/internal/endtoend/testdata/upsert/sqlite/go/models.go b/internal/endtoend/testdata/upsert/sqlite/go/models.go index b1654ed102..87f7059062 100644 --- a/internal/endtoend/testdata/upsert/sqlite/go/models.go +++ b/internal/endtoend/testdata/upsert/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Location struct { ID int64 Name string diff --git a/internal/endtoend/testdata/upsert/sqlite/go/query.sql.go b/internal/endtoend/testdata/upsert/sqlite/go/query.sql.go index 73de1c1eb9..36115f665b 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 10807d8bf6..55aeb10d28 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.23.0 +// sqlc v1.30.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 e31da36f5c..4c1efd763e 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql b/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql index 69a38e0417..db03e0d24a 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql +++ b/internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql @@ -1,8 +1,7 @@ CREATE TABLE authors ( - id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, - name text NOT NULL, - bio text, - UNIQUE(name) + id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(10) NOT NULL, + bio text ); CREATE TABLE IF NOT EXISTS weather_metrics 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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 10807d8bf6..55aeb10d28 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.23.0 +// sqlc v1.30.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 9d86ba6a76..def227c020 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.23.0 +// sqlc v1.30.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 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 10807d8bf6..55aeb10d28 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.23.0 +// sqlc v1.30.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 ab7ba46c1f..07e773a507 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/vet_disable/query.sql b/internal/endtoend/testdata/vet_disable/query.sql index c1eb8d2219..50052de26b 100644 --- a/internal/endtoend/testdata/vet_disable/query.sql +++ b/internal/endtoend/testdata/vet_disable/query.sql @@ -1,6 +1,29 @@ --- name: SkipVet :exec +-- name: RunVetAll :exec +SELECT true; + +-- name: SkipVetAll :exec -- @sqlc-vet-disable SELECT true; --- name: RunVet :exec +-- name: SkipVetSingleLine :exec +-- @sqlc-vet-disable always-fail no-exec +SELECT true; + +-- name: SkipVetMultiLine :exec +-- @sqlc-vet-disable always-fail +-- @sqlc-vet-disable no-exec +SELECT true; + +-- name: SkipVet_always_fail :exec +-- @sqlc-vet-disable always-fail +SELECT true; + +-- name: SkipVet_no_exec :exec +-- @sqlc-vet-disable no-exec +SELECT true; + +-- name: SkipVetInvalidRule :exec +-- @sqlc-vet-disable always-fail +-- @sqlc-vet-disable block-delete +-- @sqlc-vet-disable no-exec SELECT true; \ No newline at end of file diff --git a/internal/endtoend/testdata/vet_disable/sqlc.yaml b/internal/endtoend/testdata/vet_disable/sqlc.yaml index ff7c1b5200..1e53bd7f2f 100644 --- a/internal/endtoend/testdata/vet_disable/sqlc.yaml +++ b/internal/endtoend/testdata/vet_disable/sqlc.yaml @@ -9,7 +9,13 @@ sql: out: "db" rules: - always-fail + - no-exec rules: - name: always-fail message: "Fail" rule: "true" + + - name: no-exec + message: "don't use exec" + rule: | + query.cmd == "exec" diff --git a/internal/endtoend/testdata/vet_disable/stderr.txt b/internal/endtoend/testdata/vet_disable/stderr.txt index 9acbb8b34b..3d9a6169f8 100644 --- a/internal/endtoend/testdata/vet_disable/stderr.txt +++ b/internal/endtoend/testdata/vet_disable/stderr.txt @@ -1 +1,5 @@ -query.sql: RunVet: always-fail: Fail +query.sql: RunVetAll: always-fail: Fail +query.sql: RunVetAll: no-exec: don't use exec +query.sql: SkipVet_always_fail: no-exec: don't use exec +query.sql: SkipVet_no_exec: always-fail: Fail +query.sql: SkipVetInvalidRule: rule-check error: rule "block-delete" does not exist in the config file \ No newline at end of file diff --git a/internal/endtoend/testdata/vet_explain/mysql/db/db.go b/internal/endtoend/testdata/vet_explain/mysql/db/db.go index 4af9fb0d58..f2c0982087 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.23.0 +// sqlc v1.30.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 7b4330db9a..09b57f3649 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.23.0 +// sqlc v1.30.0 package test @@ -99,7 +99,7 @@ func (ns NullDebugCset) Value() (driver.Value, error) { type Debug struct { ID int64 - Csmallint int32 + Csmallint int16 Cint int32 Cinteger int32 Cdecimal string @@ -110,7 +110,7 @@ type Debug struct { Cdouble float64 Cdec string Cfixed string - Ctinyint int32 + Ctinyint int8 Cbool bool Cmediumint int32 Cbit interface{} @@ -118,7 +118,7 @@ type Debug struct { Cdatetime time.Time Ctimestamp time.Time Ctime time.Time - Cyear int32 + Cyear int16 Cchar string Cvarchar string Cbinary []byte 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 42b3c4863d..cef6fbff90 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.23.0 +// sqlc v1.30.0 // source: query.sql package test @@ -316,7 +316,7 @@ SELECT id FROM debug WHERE Csmallint = ? LIMIT 1 ` -func (q *Queries) SelectByCsmallint(ctx context.Context, csmallint int32) (int64, error) { +func (q *Queries) SelectByCsmallint(ctx context.Context, csmallint int16) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCsmallint, csmallint) var id int64 err := row.Scan(&id) @@ -376,7 +376,7 @@ SELECT id FROM debug WHERE Ctinyint = ? LIMIT 1 ` -func (q *Queries) SelectByCtinyint(ctx context.Context, ctinyint int32) (int64, error) { +func (q *Queries) SelectByCtinyint(ctx context.Context, ctinyint int8) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCtinyint, ctinyint) var id int64 err := row.Scan(&id) @@ -424,7 +424,7 @@ SELECT id FROM debug WHERE Cyear = ? LIMIT 1 ` -func (q *Queries) SelectByCyear(ctx context.Context, cyear int32) (int64, error) { +func (q *Queries) SelectByCyear(ctx context.Context, cyear int16) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCyear, cyear) var id int64 err := row.Scan(&id) diff --git a/internal/endtoend/testdata/vet_failures/query.sql b/internal/endtoend/testdata/vet_failures/query.sql index 718f3395c0..75e38b2caf 100644 --- a/internal/endtoend/testdata/vet_failures/query.sql +++ b/internal/endtoend/testdata/vet_failures/query.sql @@ -1,9 +1,3 @@ -CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text -); - -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; diff --git a/internal/endtoend/testdata/vet_failures/sqlc.yaml b/internal/endtoend/testdata/vet_failures/sqlc.yaml index 10d5246f8b..b1cff78c30 100644 --- a/internal/endtoend/testdata/vet_failures/sqlc.yaml +++ b/internal/endtoend/testdata/vet_failures/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/virtual_table/sqlite/go/db.go b/internal/endtoend/testdata/virtual_table/sqlite/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 2eb8a473e8..c2d2118717 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.23.0 +// sqlc v1.30.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 c5d7d9eb8a..dab27d29cf 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.23.0 +// sqlc v1.30.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 483ff8e17f..fa4beb305c 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.23.0", + "SQLC_VERSION=v1.30.0", "SQLC_DUMMY_VALUE=true" ] } diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/query.sql b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/query.sql new file mode 100644 index 0000000000..75e38b2caf --- /dev/null +++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/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/wasm_plugin_sqlc_gen_unsafe_paths/schema.sql b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/schema.sql new file mode 100644 index 0000000000..b4fad78497 --- /dev/null +++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/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/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json new file mode 100644 index 0000000000..bb84bddebf --- /dev/null +++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json @@ -0,0 +1,25 @@ +{ + "version": "2", + "sql": [ + { + "schema": "schema.sql", + "queries": "query.sql", + "engine": "postgresql", + "codegen": [ + { + "out": "gen", + "plugin": "test" + } + ] + } + ], + "plugins": [ + { + "name": "test", + "wasm": { + "url": "https://github.com/sqlc-dev/sqlc-gen-unsafe-paths/releases/download/v0.1.1/sqlc-gen-unsafe-paths.wasm", + "sha256": "e53ac951dd41b1e4c365e757d9735886f7c8e92f2056ce0be9a5cfcf677c45d9" + } + } + ] +} diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt new file mode 100644 index 0000000000..8d664b0612 --- /dev/null +++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt @@ -0,0 +1,2 @@ +# package test +error generating code: invalid file output path: /tmp/unsafe.txt diff --git a/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt new file mode 100644 index 0000000000..33d32af53a --- /dev/null +++ b/internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt @@ -0,0 +1,2 @@ +# package test +error generating code: invalid file output path: D:/tmp/unsafe.txt diff --git a/internal/endtoend/testdata/where_collate/sqlite/go/db.go b/internal/endtoend/testdata/where_collate/sqlite/go/db.go index 047c62d9a3..3b320aa168 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.23.0 +// sqlc v1.30.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 06e4a6c03a..33d29619ca 100644 --- a/internal/endtoend/testdata/where_collate/sqlite/go/models.go +++ b/internal/endtoend/testdata/where_collate/sqlite/go/models.go @@ -1,11 +1,9 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.23.0 +// sqlc v1.30.0 package querytest -import () - type Account struct { ID string Name string 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 203ec769ab..52633252b3 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.23.0 +// sqlc v1.30.0 // source: query.sql package querytest diff --git a/internal/endtoend/testdata/wrap_errors/mysql/db/db.go b/internal/endtoend/testdata/wrap_errors/mysql/db/db.go new file mode 100644 index 0000000000..fc409f7e3f --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/mysql/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/wrap_errors/mysql/db/models.go b/internal/endtoend/testdata/wrap_errors/mysql/db/models.go new file mode 100644 index 0000000000..24e47df1ef --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/mysql/db/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package authors + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/wrap_errors/mysql/db/query.sql.go b/internal/endtoend/testdata/wrap_errors/mysql/db/query.sql.go new file mode 100644 index 0000000000..1cf96f1534 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/mysql/db/query.sql.go @@ -0,0 +1,123 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package authors + +import ( + "context" + "database/sql" + "fmt" +) + +const createAuthor = `-- name: CreateAuthor :execlastid +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +` + +func (q *Queries) CreateAuthor(ctx context.Context) (int64, error) { + result, err := q.db.ExecContext(ctx, createAuthor) + if err != nil { + return 0, fmt.Errorf("query CreateAuthor: %w", err) + } + return result.LastInsertId() +} + +const deleteAuthorExec = `-- name: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExec(ctx context.Context) error { + _, err := q.db.ExecContext(ctx, deleteAuthorExec) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExec: %w", err) + } + return err +} + +const deleteAuthorExecLastID = `-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecLastID(ctx context.Context) (int64, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecLastID) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecLastID: %w", err) + } + return result.LastInsertId() +} + +const deleteAuthorExecResult = `-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecResult(ctx context.Context) (sql.Result, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecResult) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExecResult: %w", err) + } + return result, err +} + +const deleteAuthorExecRows = `-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecRows(ctx context.Context) (int64, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecRows) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecRows: %w", err) + } + return result.RowsAffected() +} + +const getAuthor = `-- name: GetAuthor :one +SELECT id, name, bio FROM authors +WHERE id = $1 LIMIT 1 +` + +func (q *Queries) GetAuthor(ctx context.Context) (Author, error) { + row := q.db.QueryRowContext(ctx, getAuthor) + var i Author + err := row.Scan(&i.ID, &i.Name, &i.Bio) + if err != nil { + err = fmt.Errorf("query GetAuthor: %w", err) + } + 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, fmt.Errorf("query ListAuthors: %w", 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, fmt.Errorf("query ListAuthors: %w", err) + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + if err := rows.Err(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + return items, nil +} diff --git a/internal/endtoend/testdata/wrap_errors/mysql/query.sql b/internal/endtoend/testdata/wrap_errors/mysql/query.sql new file mode 100644 index 0000000000..3f9971d942 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/mysql/query.sql @@ -0,0 +1,30 @@ +-- name: GetAuthor :one +SELECT * FROM authors +WHERE id = $1 LIMIT 1; + +-- name: ListAuthors :many +SELECT * FROM authors +ORDER BY name; + +-- name: CreateAuthor :execlastid +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +); + +-- name: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = $1; diff --git a/internal/endtoend/testdata/wrap_errors/mysql/schema.sql b/internal/endtoend/testdata/wrap_errors/mysql/schema.sql new file mode 100644 index 0000000000..8d65cdb7b5 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/mysql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/wrap_errors/mysql/sqlc.yaml b/internal/endtoend/testdata/wrap_errors/mysql/sqlc.yaml new file mode 100644 index 0000000000..5b3b1ddc10 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/mysql/sqlc.yaml @@ -0,0 +1,10 @@ +version: 2 +sql: + - schema: "schema.sql" + queries: "query.sql" + engine: "mysql" + gen: + go: + package: "authors" + out: "db" + wrap_errors: true diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/db.go b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/db.go new file mode 100644 index 0000000000..e1f93c6f1d --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package authors + +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/wrap_errors/postgresql/pgx/db/models.go b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/models.go new file mode 100644 index 0000000000..7845b91a3d --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package authors + +import ( + "github.com/jackc/pgx/v5/pgtype" +) + +type Author struct { + ID int64 + Name string + Bio pgtype.Text +} diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/query.sql.go b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/query.sql.go new file mode 100644 index 0000000000..82fee58e9c --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/query.sql.go @@ -0,0 +1,122 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package authors + +import ( + "context" + "fmt" + + "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/pgtype" +) + +const createAuthor = `-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +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) + if err != nil { + err = fmt.Errorf("query CreateAuthor: %w", err) + } + return i, err +} + +const deleteAuthorExec = `-- name: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExec(ctx context.Context, id int64) error { + _, err := q.db.Exec(ctx, deleteAuthorExec, id) + if err != nil { + return fmt.Errorf("query DeleteAuthorExec: %w", err) + } + return nil +} + +const deleteAuthorExecLastID = `-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = $1 +` + +const deleteAuthorExecResult = `-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecResult(ctx context.Context, id int64) (pgconn.CommandTag, error) { + result, err := q.db.Exec(ctx, deleteAuthorExecResult, id) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExecResult: %w", err) + } + return result, err +} + +const deleteAuthorExecRows = `-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecRows(ctx context.Context, id int64) (int64, error) { + result, err := q.db.Exec(ctx, deleteAuthorExecRows, id) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecRows: %w", err) + } + return result.RowsAffected(), nil +} + +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.QueryRow(ctx, getAuthor, id) + var i Author + err := row.Scan(&i.ID, &i.Name, &i.Bio) + if err != nil { + err = fmt.Errorf("query GetAuthor: %w", err) + } + 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.Query(ctx, listAuthors) + if err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", 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, fmt.Errorf("query ListAuthors: %w", err) + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + return items, nil +} diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/pgx/query.sql b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/query.sql new file mode 100644 index 0000000000..e0310a2257 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/query.sql @@ -0,0 +1,31 @@ +-- 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: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = $1; diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/pgx/schema.sql b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/schema.sql new file mode 100644 index 0000000000..b4fad78497 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/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/wrap_errors/postgresql/pgx/sqlc.yaml b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/sqlc.yaml new file mode 100644 index 0000000000..5a2adcda8e --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/pgx/sqlc.yaml @@ -0,0 +1,11 @@ +version: 2 +sql: + - schema: "schema.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + package: "authors" + sql_package: "pgx/v5" + out: "db" + wrap_errors: true diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/db.go b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/db.go new file mode 100644 index 0000000000..fc409f7e3f --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/wrap_errors/postgresql/stdlib/db/models.go b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/models.go new file mode 100644 index 0000000000..24e47df1ef --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package authors + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/query.sql.go b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/query.sql.go new file mode 100644 index 0000000000..e7026afd76 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/query.sql.go @@ -0,0 +1,131 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package authors + +import ( + "context" + "database/sql" + "fmt" +) + +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) + if err != nil { + err = fmt.Errorf("query CreateAuthor: %w", err) + } + return i, err +} + +const deleteAuthorExec = `-- name: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExec(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteAuthorExec, id) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExec: %w", err) + } + return err +} + +const deleteAuthorExecLastID = `-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecLastID(ctx context.Context, id int64) (int64, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecLastID, id) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecLastID: %w", err) + } + return result.LastInsertId() +} + +const deleteAuthorExecResult = `-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecResult(ctx context.Context, id int64) (sql.Result, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecResult, id) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExecResult: %w", err) + } + return result, err +} + +const deleteAuthorExecRows = `-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = $1 +` + +func (q *Queries) DeleteAuthorExecRows(ctx context.Context, id int64) (int64, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecRows, id) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecRows: %w", err) + } + return result.RowsAffected() +} + +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) + if err != nil { + err = fmt.Errorf("query GetAuthor: %w", err) + } + 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, fmt.Errorf("query ListAuthors: %w", 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, fmt.Errorf("query ListAuthors: %w", err) + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + if err := rows.Err(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + return items, nil +} diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/query.sql b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/query.sql new file mode 100644 index 0000000000..e0310a2257 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/query.sql @@ -0,0 +1,31 @@ +-- 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: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = $1; + +-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = $1; diff --git a/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/schema.sql b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/schema.sql new file mode 100644 index 0000000000..b4fad78497 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/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/wrap_errors/postgresql/stdlib/sqlc.yaml b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/sqlc.yaml new file mode 100644 index 0000000000..6827bf778a --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/postgresql/stdlib/sqlc.yaml @@ -0,0 +1,10 @@ +version: 2 +sql: + - schema: "schema.sql" + queries: "query.sql" + engine: "postgresql" + gen: + go: + package: "authors" + out: "db" + wrap_errors: true diff --git a/internal/endtoend/testdata/wrap_errors/sqlite/db/db.go b/internal/endtoend/testdata/wrap_errors/sqlite/db/db.go new file mode 100644 index 0000000000..fc409f7e3f --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/sqlite/db/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.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/wrap_errors/sqlite/db/models.go b/internal/endtoend/testdata/wrap_errors/sqlite/db/models.go new file mode 100644 index 0000000000..24e47df1ef --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/sqlite/db/models.go @@ -0,0 +1,15 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 + +package authors + +import ( + "database/sql" +) + +type Author struct { + ID int64 + Name string + Bio sql.NullString +} diff --git a/internal/endtoend/testdata/wrap_errors/sqlite/db/query.sql.go b/internal/endtoend/testdata/wrap_errors/sqlite/db/query.sql.go new file mode 100644 index 0000000000..766671117c --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/sqlite/db/query.sql.go @@ -0,0 +1,128 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package authors + +import ( + "context" + "database/sql" + "fmt" +) + +const createAuthor = `-- name: CreateAuthor :execlastid +INSERT INTO authors ( + name, bio +) VALUES ( + ?1, ?2 +) +` + +type CreateAuthorParams struct { + Name string + Bio sql.NullString +} + +func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (int64, error) { + result, err := q.db.ExecContext(ctx, createAuthor, arg.Name, arg.Bio) + if err != nil { + return 0, fmt.Errorf("query CreateAuthor: %w", err) + } + return result.LastInsertId() +} + +const deleteAuthorExec = `-- name: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = ?1 +` + +func (q *Queries) DeleteAuthorExec(ctx context.Context, id int64) error { + _, err := q.db.ExecContext(ctx, deleteAuthorExec, id) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExec: %w", err) + } + return err +} + +const deleteAuthorExecLastID = `-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = ?1 +` + +func (q *Queries) DeleteAuthorExecLastID(ctx context.Context, id int64) (int64, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecLastID, id) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecLastID: %w", err) + } + return result.LastInsertId() +} + +const deleteAuthorExecResult = `-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = ?1 +` + +func (q *Queries) DeleteAuthorExecResult(ctx context.Context, id int64) (sql.Result, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecResult, id) + if err != nil { + err = fmt.Errorf("query DeleteAuthorExecResult: %w", err) + } + return result, err +} + +const deleteAuthorExecRows = `-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = ?1 +` + +func (q *Queries) DeleteAuthorExecRows(ctx context.Context, id int64) (int64, error) { + result, err := q.db.ExecContext(ctx, deleteAuthorExecRows, id) + if err != nil { + return 0, fmt.Errorf("query DeleteAuthorExecRows: %w", err) + } + return result.RowsAffected() +} + +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) + if err != nil { + err = fmt.Errorf("query GetAuthor: %w", err) + } + 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, fmt.Errorf("query ListAuthors: %w", 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, fmt.Errorf("query ListAuthors: %w", err) + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + if err := rows.Err(); err != nil { + return nil, fmt.Errorf("query ListAuthors: %w", err) + } + return items, nil +} diff --git a/internal/endtoend/testdata/wrap_errors/sqlite/query.sql b/internal/endtoend/testdata/wrap_errors/sqlite/query.sql new file mode 100644 index 0000000000..2db6403c8b --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/sqlite/query.sql @@ -0,0 +1,30 @@ +-- name: GetAuthor :one +SELECT * FROM authors +WHERE id = ?1 LIMIT 1; + +-- name: ListAuthors :many +SELECT * FROM authors +ORDER BY name; + +-- name: CreateAuthor :execlastid +INSERT INTO authors ( + name, bio +) VALUES ( + ?1, ?2 +); + +-- name: DeleteAuthorExec :exec +DELETE FROM authors +WHERE id = ?1; + +-- name: DeleteAuthorExecRows :execrows +DELETE FROM authors +WHERE id = ?1; + +-- name: DeleteAuthorExecLastID :execlastid +DELETE FROM authors +WHERE id = ?1; + +-- name: DeleteAuthorExecResult :execresult +DELETE FROM authors +WHERE id = ?1; diff --git a/internal/endtoend/testdata/wrap_errors/sqlite/schema.sql b/internal/endtoend/testdata/wrap_errors/sqlite/schema.sql new file mode 100644 index 0000000000..8d65cdb7b5 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/sqlite/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGINT PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/wrap_errors/sqlite/sqlc.yaml b/internal/endtoend/testdata/wrap_errors/sqlite/sqlc.yaml new file mode 100644 index 0000000000..de726297c7 --- /dev/null +++ b/internal/endtoend/testdata/wrap_errors/sqlite/sqlc.yaml @@ -0,0 +1,10 @@ +version: 2 +sql: + - schema: "schema.sql" + queries: "query.sql" + engine: "sqlite" + gen: + go: + package: "authors" + out: "db" + wrap_errors: true diff --git a/internal/endtoend/testdata/yaml_overrides/go/db.go b/internal/endtoend/testdata/yaml_overrides/go/db.go index d84696f5c3..9c19dd4a09 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/yaml_overrides/go/models.go b/internal/endtoend/testdata/yaml_overrides/go/models.go index b2ce59363f..051e7672e0 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.23.0 +// sqlc v1.30.0 package override diff --git a/internal/endtoend/testdata/yaml_overrides/go/query.sql.go b/internal/endtoend/testdata/yaml_overrides/go/query.sql.go new file mode 100644 index 0000000000..0faba2cde4 --- /dev/null +++ b/internal/endtoend/testdata/yaml_overrides/go/query.sql.go @@ -0,0 +1,21 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: query.sql + +package override + +import ( + "context" +) + +const test = `-- name: Test :one +SELECT 1 +` + +func (q *Queries) Test(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, test) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} diff --git a/internal/endtoend/testdata/yaml_overrides/sql/query.sql b/internal/endtoend/testdata/yaml_overrides/sql/query.sql index e0ac49d1ec..9da604b57e 100644 --- a/internal/endtoend/testdata/yaml_overrides/sql/query.sql +++ b/internal/endtoend/testdata/yaml_overrides/sql/query.sql @@ -1 +1,2 @@ +-- name: Test :one SELECT 1; diff --git a/internal/endtoend/vet_test.go b/internal/endtoend/vet_test.go index 56b5837ed3..011c032c2e 100644 --- a/internal/endtoend/vet_test.go +++ b/internal/endtoend/vet_test.go @@ -1,5 +1,4 @@ //go:build examples -// +build examples package main @@ -9,10 +8,12 @@ import ( "fmt" "os" "path/filepath" + "strings" "testing" "github.com/sqlc-dev/sqlc/internal/cmd" "github.com/sqlc-dev/sqlc/internal/sqltest" + "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func findSchema(t *testing.T, path string) (string, bool) { @@ -31,11 +32,6 @@ func TestExamplesVet(t *testing.T) { t.Parallel() ctx := context.Background() - authToken := os.Getenv("SQLC_AUTH_TOKEN") - if authToken == "" { - t.Skip("missing auth token") - } - examples, err := filepath.Abs(filepath.Join("..", "..", "examples")) if err != nil { t.Fatal(err) @@ -56,17 +52,20 @@ func TestExamplesVet(t *testing.T) { path := filepath.Join(examples, tc) if tc != "kotlin" && tc != "python" { - if s, found := findSchema(t, filepath.Join(path, "mysql")); found { - db, cleanup := sqltest.CreateMySQLDatabase(t, tc, []string{s}) - defer db.Close() - defer cleanup() - } if s, found := findSchema(t, filepath.Join(path, "sqlite")); found { dsn := fmt.Sprintf("file:%s?mode=memory&cache=shared", tc) db, cleanup := sqltest.CreateSQLiteDatabase(t, dsn, []string{s}) defer db.Close() defer cleanup() } + if s, found := findSchema(t, filepath.Join(path, "mysql")); found { + uri := local.MySQL(t, []string{s}) + os.Setenv(fmt.Sprintf("VET_TEST_EXAMPLES_MYSQL_%s", strings.ToUpper(tc)), uri) + } + if s, found := findSchema(t, filepath.Join(path, "postgresql")); found { + uri := local.PostgreSQL(t, []string{s}) + os.Setenv(fmt.Sprintf("VET_TEST_EXAMPLES_POSTGRES_%s", strings.ToUpper(tc)), uri) + } } var stderr bytes.Buffer diff --git a/internal/engine/dolphin/convert.go b/internal/engine/dolphin/convert.go index 6d1f12fd0d..33b89ae8f4 100644 --- a/internal/engine/dolphin/convert.go +++ b/internal/engine/dolphin/convert.go @@ -4,11 +4,11 @@ import ( "log" "strings" - pcast "github.com/pingcap/tidb/parser/ast" - "github.com/pingcap/tidb/parser/mysql" - "github.com/pingcap/tidb/parser/opcode" - driver "github.com/pingcap/tidb/parser/test_driver" - "github.com/pingcap/tidb/parser/types" + pcast "github.com/pingcap/tidb/pkg/parser/ast" + "github.com/pingcap/tidb/pkg/parser/mysql" + "github.com/pingcap/tidb/pkg/parser/opcode" + driver "github.com/pingcap/tidb/pkg/parser/test_driver" + "github.com/pingcap/tidb/pkg/parser/types" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -727,10 +727,6 @@ func (c *cc) convertCaseExpr(n *pcast.CaseExpr) ast.Node { } } -func (c *cc) convertChangeStmt(n *pcast.ChangeStmt) ast.Node { - return todo(n) -} - func (c *cc) convertCleanupTableLockStmt(n *pcast.CleanupTableLockStmt) ast.Node { return todo(n) } @@ -915,10 +911,6 @@ func (c *cc) convertHavingClause(n *pcast.HavingClause) ast.Node { return c.convert(n.Expr) } -func (c *cc) convertIndexAdviseStmt(n *pcast.IndexAdviseStmt) ast.Node { - return todo(n) -} - func (c *cc) convertIndexLockAndAlgorithm(n *pcast.IndexLockAndAlgorithm) ast.Node { return todo(n) } @@ -997,7 +989,30 @@ func (c *cc) convertLockTablesStmt(n *pcast.LockTablesStmt) ast.Node { } func (c *cc) convertMatchAgainst(n *pcast.MatchAgainst) ast.Node { - return todo(n) + searchTerm := c.convert(n.Against) + + stringSearchTerm := &ast.TypeCast{ + Arg: searchTerm, + TypeName: &ast.TypeName{ + Name: "text", // Use 'text' type which maps to string in Go + }, + Location: n.OriginTextPosition(), + } + + matchOperation := &ast.A_Const{ + Val: &ast.String{Str: "MATCH_AGAINST"}, + } + + return &ast.A_Expr{ + Name: &ast.List{ + Items: []ast.Node{ + &ast.String{Str: "AGAINST"}, + }, + }, + Lexpr: matchOperation, + Rexpr: stringSearchTerm, + Location: n.OriginTextPosition(), + } } func (c *cc) convertMaxValueExpr(n *pcast.MaxValueExpr) ast.Node { @@ -1025,18 +1040,7 @@ func (c *cc) convertOrderByClause(n *pcast.OrderByClause) ast.Node { } list := &ast.List{Items: []ast.Node{}} for _, item := range n.Items { - switch item.Expr.(type) { - case *pcast.CaseExpr: - list.Items = append(list.Items, &ast.CaseWhen{ - Expr: c.convert(item.Expr), - Location: item.Expr.OriginTextPosition(), - }) - case *pcast.ColumnNameExpr: - list.Items = append(list.Items, &ast.CaseExpr{ - Xpr: c.convert(item.Expr), - Location: item.Expr.OriginTextPosition(), - }) - } + list.Items = append(list.Items, c.convert(item.Expr)) } return list } @@ -1197,7 +1201,12 @@ func (c *cc) convertSetOprType(n *pcast.SetOprType) (op ast.SetOperation, all bo func (c *cc) convertSetOprSelectList(n *pcast.SetOprSelectList) ast.Node { selectStmts := make([]*ast.SelectStmt, len(n.Selects)) for i, node := range n.Selects { - selectStmts[i] = c.convertSelectStmt(node.(*pcast.SelectStmt)) + switch node := node.(type) { + case *pcast.SelectStmt: + selectStmts[i] = c.convertSelectStmt(node) + case *pcast.SetOprSelectList: + selectStmts[i] = c.convertSetOprSelectList(node).(*ast.SelectStmt) + } } op, all := c.convertSetOprType(n.AfterSetOperator) @@ -1511,9 +1520,6 @@ func (c *cc) convert(node pcast.Node) ast.Node { case *pcast.CaseExpr: return c.convertCaseExpr(n) - case *pcast.ChangeStmt: - return c.convertChangeStmt(n) - case *pcast.CleanupTableLockStmt: return c.convertCleanupTableLockStmt(n) @@ -1649,9 +1655,6 @@ func (c *cc) convert(node pcast.Node) ast.Node { case *pcast.HavingClause: return c.convertHavingClause(n) - case *pcast.IndexAdviseStmt: - return c.convertIndexAdviseStmt(n) - case *pcast.IndexLockAndAlgorithm: return c.convertIndexLockAndAlgorithm(n) diff --git a/internal/engine/dolphin/parse.go b/internal/engine/dolphin/parse.go index 22d3a1d224..537f7ad64f 100644 --- a/internal/engine/dolphin/parse.go +++ b/internal/engine/dolphin/parse.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/pingcap/tidb/parser" - _ "github.com/pingcap/tidb/parser/test_driver" + "github.com/pingcap/tidb/pkg/parser" + _ "github.com/pingcap/tidb/pkg/parser/test_driver" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" diff --git a/internal/engine/dolphin/stdlib.go b/internal/engine/dolphin/stdlib.go index 37de5d7cb6..41469ca49d 100644 --- a/internal/engine/dolphin/stdlib.go +++ b/internal/engine/dolphin/stdlib.go @@ -2388,6 +2388,15 @@ func defaultSchema(name string) *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datetime"}, }, + { + Name: "NEXTVAL", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + }, + }, + ReturnType: &ast.TypeName{Name: "int"}, + }, { Name: "NOW", Args: []*catalog.Argument{ diff --git a/internal/engine/dolphin/utils.go b/internal/engine/dolphin/utils.go index dd3b8f58d8..e920489e6a 100644 --- a/internal/engine/dolphin/utils.go +++ b/internal/engine/dolphin/utils.go @@ -1,8 +1,8 @@ package dolphin import ( - pcast "github.com/pingcap/tidb/parser/ast" - "github.com/pingcap/tidb/parser/mysql" + pcast "github.com/pingcap/tidb/pkg/parser/ast" + "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) @@ -52,6 +52,9 @@ func convertToRangeVarList(list *ast.List, result *ast.List) { if !ok { if list, check := rel.Larg.(*ast.List); check { convertToRangeVarList(list, result) + } else if subselect, check := rel.Larg.(*ast.RangeSubselect); check { + // Handle subqueries in JOIN clauses + result.Items = append(result.Items, subselect) } else { panic("expected range var") } @@ -64,6 +67,9 @@ func convertToRangeVarList(list *ast.List, result *ast.List) { if !ok { if list, check := rel.Rarg.(*ast.List); check { convertToRangeVarList(list, result) + } else if subselect, check := rel.Rarg.(*ast.RangeSubselect); check { + // Handle subqueries in JOIN clauses + result.Items = append(result.Items, subselect) } else { panic("expected range var") } @@ -75,6 +81,9 @@ func convertToRangeVarList(list *ast.List, result *ast.List) { case *ast.RangeVar: result.Items = append(result.Items, rel) + case *ast.RangeSubselect: + result.Items = append(result.Items, rel) + default: panic("expected range var") } diff --git a/internal/engine/postgresql/analyzer/analyze.go b/internal/engine/postgresql/analyzer/analyze.go index 7a3a53892c..5a08fa98ec 100644 --- a/internal/engine/postgresql/analyzer/analyze.go +++ b/internal/engine/postgresql/analyzer/analyze.go @@ -13,8 +13,8 @@ import ( core "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/config" + "github.com/sqlc-dev/sqlc/internal/dbmanager" "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" @@ -23,7 +23,7 @@ import ( type Analyzer struct { db config.Database - client pb.QuickClient + client dbmanager.Client pool *pgxpool.Pool dbg opts.Debug replacer *shfmt.Replacer @@ -32,7 +32,7 @@ type Analyzer struct { tables sync.Map } -func New(client pb.QuickClient, db config.Database) *Analyzer { +func New(client dbmanager.Client, db config.Database) *Analyzer { return &Analyzer{ db: db, dbg: opts.DebugFromEnv(), @@ -201,7 +201,7 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat if a.client == nil { return nil, fmt.Errorf("client is nil") } - edb, err := a.client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ + edb, err := a.client.CreateDatabase(ctx, &dbmanager.CreateDatabaseRequest{ Engine: "postgresql", Migrations: migrations, }) @@ -253,8 +253,7 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat if err != nil { return nil, err } - // TODO: Why are these dims different? - dt, isArray, _ := parseType(col.DataType) + dt, isArray, dims := parseType(col.DataType) notNull := col.NotNull name := field.Name result.Columns = append(result.Columns, &core.Column{ @@ -263,7 +262,7 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat DataType: dt, NotNull: notNull, IsArray: isArray, - ArrayDims: int32(col.ArrayDims), + ArrayDims: int32(max(col.ArrayDims, dims)), Table: &core.Identifier{ Schema: tbl.SchemaName, Name: tbl.TableName, diff --git a/internal/engine/postgresql/convert.go b/internal/engine/postgresql/convert.go index 38a5e62a26..f56a572c16 100644 --- a/internal/engine/postgresql/convert.go +++ b/internal/engine/postgresql/convert.go @@ -1,12 +1,9 @@ -//go:build !windows && cgo -// +build !windows,cgo - package postgresql import ( "fmt" - pg "github.com/pganalyze/pg_query_go/v4" + pg "github.com/pganalyze/pg_query_go/v6" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) @@ -186,7 +183,6 @@ func convertAggref(n *pg.Aggref) *ast.Aggref { Aggtype: ast.Oid(n.Aggtype), Aggcollid: ast.Oid(n.Aggcollid), Inputcollid: ast.Oid(n.Inputcollid), - Aggtranstype: ast.Oid(n.Aggtranstype), Aggargtypes: convertSlice(n.Aggargtypes), Aggdirectargs: convertSlice(n.Aggdirectargs), Args: convertSlice(n.Args), @@ -1666,7 +1662,6 @@ func convertGrantRoleStmt(n *pg.GrantRoleStmt) *ast.GrantRoleStmt { GrantedRoles: convertSlice(n.GrantedRoles), GranteeRoles: convertSlice(n.GranteeRoles), IsGrant: n.IsGrant, - AdminOpt: n.AdminOpt, Grantor: convertRoleSpec(n.Grantor), Behavior: ast.DropBehavior(n.Behavior), } @@ -1696,7 +1691,6 @@ func convertGroupingFunc(n *pg.GroupingFunc) *ast.GroupingFunc { Xpr: convertNode(n.Xpr), Args: convertSlice(n.Args), Refs: convertSlice(n.Refs), - Cols: convertSlice(n.Cols), Agglevelsup: ast.Index(n.Agglevelsup), Location: int(n.Location), } @@ -1757,7 +1751,6 @@ func convertIndexStmt(n *pg.IndexStmt) *ast.IndexStmt { ExcludeOpNames: convertSlice(n.ExcludeOpNames), Idxcomment: makeString(n.Idxcomment), IndexOid: ast.Oid(n.IndexOid), - OldNode: ast.Oid(n.OldNode), Unique: n.Unique, Primary: n.Primary, Isconstraint: n.Isconstraint, @@ -2019,7 +2012,6 @@ func convertOpExpr(n *pg.OpExpr) *ast.OpExpr { return &ast.OpExpr{ Xpr: convertNode(n.Xpr), Opno: ast.Oid(n.Opno), - Opfuncid: ast.Oid(n.Opfuncid), Opresulttype: ast.Oid(n.Opresulttype), Opretset: n.Opretset, Opcollid: ast.Oid(n.Opcollid), @@ -2111,7 +2103,7 @@ func convertPartitionSpec(n *pg.PartitionSpec) *ast.PartitionSpec { return nil } return &ast.PartitionSpec{ - Strategy: makeString(n.Strategy), + Strategy: makeString(n.Strategy.String()), PartParams: convertSlice(n.PartParams), Location: int(n.Location), } @@ -2269,11 +2261,6 @@ func convertRangeTblEntry(n *pg.RangeTblEntry) *ast.RangeTblEntry { Lateral: n.Lateral, Inh: n.Inh, InFromCl: n.InFromCl, - RequiredPerms: ast.AclMode(n.RequiredPerms), - CheckAsUser: ast.Oid(n.CheckAsUser), - SelectedCols: makeUint32Slice(n.SelectedCols), - InsertedCols: makeUint32Slice(n.InsertedCols), - UpdatedCols: makeUint32Slice(n.UpdatedCols), SecurityQuals: convertSlice(n.SecurityQuals), } } @@ -2501,7 +2488,6 @@ func convertScalarArrayOpExpr(n *pg.ScalarArrayOpExpr) *ast.ScalarArrayOpExpr { return &ast.ScalarArrayOpExpr{ Xpr: convertNode(n.Xpr), Opno: ast.Oid(n.Opno), - Opfuncid: ast.Oid(n.Opfuncid), UseOr: n.UseOr, Inputcollid: ast.Oid(n.Inputcollid), Args: convertSlice(n.Args), diff --git a/internal/engine/postgresql/parse.go b/internal/engine/postgresql/parse.go index 296a14e858..40af125962 100644 --- a/internal/engine/postgresql/parse.go +++ b/internal/engine/postgresql/parse.go @@ -1,6 +1,3 @@ -//go:build !windows && cgo -// +build !windows,cgo - package postgresql import ( @@ -9,9 +6,9 @@ import ( "io" "strings" - nodes "github.com/pganalyze/pg_query_go/v4" - "github.com/pganalyze/pg_query_go/v4/parser" + nodes "github.com/pganalyze/pg_query_go/v6" + "github.com/sqlc-dev/sqlc/internal/engine/postgresql/parser" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" @@ -154,7 +151,7 @@ func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { if err != nil { return nil, err } - tree, err := nodes.Parse(string(contents)) + tree, err := Parse(string(contents)) if err != nil { pErr := normalizeErr(err) return nil, pErr @@ -274,7 +271,7 @@ func translate(node *nodes.Node) (ast.Node, error) { case nodes.AlterTableType_AT_AddColumn: d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef) if !ok { - return nil, fmt.Errorf("expected alter table defintion to be a ColumnDef") + return nil, fmt.Errorf("expected alter table definition to be a ColumnDef") } rel, err := parseRelationFromNodes(d.ColumnDef.TypeName.Names) @@ -293,7 +290,7 @@ func translate(node *nodes.Node) (ast.Node, error) { case nodes.AlterTableType_AT_AlterColumnType: d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef) if !ok { - return nil, fmt.Errorf("expected alter table defintion to be a ColumnDef") + return nil, fmt.Errorf("expected alter table definition to be a ColumnDef") } col := "" if altercmd.Name != "" { @@ -620,7 +617,7 @@ func translate(node *nodes.Node) (ast.Node, error) { MissingOk: n.MissingOk, }, nil - case nodes.ObjectType_OBJECT_TABLE: + case nodes.ObjectType_OBJECT_TABLE, nodes.ObjectType_OBJECT_MATVIEW, nodes.ObjectType_OBJECT_VIEW: rel := parseRelationFromRangeVar(n.Relation) return &ast.RenameTableStmt{ Table: rel.TableName(), diff --git a/internal/engine/postgresql/parse_default.go b/internal/engine/postgresql/parse_default.go new file mode 100644 index 0000000000..272f189649 --- /dev/null +++ b/internal/engine/postgresql/parse_default.go @@ -0,0 +1,10 @@ +//go:build !windows && cgo + +package postgresql + +import ( + nodes "github.com/pganalyze/pg_query_go/v6" +) + +var Parse = nodes.Parse +var Fingerprint = nodes.Fingerprint diff --git a/internal/engine/postgresql/parse_disabled.go b/internal/engine/postgresql/parse_disabled.go deleted file mode 100644 index b07817b431..0000000000 --- a/internal/engine/postgresql/parse_disabled.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build windows || !cgo -// +build windows !cgo - -package postgresql - -import ( - "errors" - "io" - "runtime" - - "github.com/sqlc-dev/sqlc/internal/source" - "github.com/sqlc-dev/sqlc/internal/sql/ast" -) - -func NewParser() *Parser { - return &Parser{} -} - -type Parser struct { -} - -func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { - if runtime.GOOS == "windows" { - return nil, errors.New("the PostgreSQL engine does not support Windows.") - } - return nil, errors.New("the PostgreSQL engine requires cgo. Please set CGO_ENABLED=1.") -} - -// https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS -func (p *Parser) CommentSyntax() source.CommentSyntax { - return source.CommentSyntax{ - Dash: true, - SlashStar: true, - } -} diff --git a/internal/engine/postgresql/parse_wasi.go b/internal/engine/postgresql/parse_wasi.go new file mode 100644 index 0000000000..377b812cdb --- /dev/null +++ b/internal/engine/postgresql/parse_wasi.go @@ -0,0 +1,10 @@ +//go:build windows || !cgo + +package postgresql + +import ( + nodes "github.com/wasilibs/go-pgquery" +) + +var Parse = nodes.Parse +var Fingerprint = nodes.Fingerprint diff --git a/internal/engine/postgresql/parser/parser_default.go b/internal/engine/postgresql/parser/parser_default.go new file mode 100644 index 0000000000..706c3bb097 --- /dev/null +++ b/internal/engine/postgresql/parser/parser_default.go @@ -0,0 +1,7 @@ +//go:build !windows && cgo + +package parser + +import "github.com/pganalyze/pg_query_go/v6/parser" + +type Error = parser.Error diff --git a/internal/engine/postgresql/parser/parser_wasi.go b/internal/engine/postgresql/parser/parser_wasi.go new file mode 100644 index 0000000000..e172d36c72 --- /dev/null +++ b/internal/engine/postgresql/parser/parser_wasi.go @@ -0,0 +1,7 @@ +//go:build windows || !cgo + +package parser + +import "github.com/wasilibs/go-pgquery/parser" + +type Error = parser.Error diff --git a/internal/engine/postgresql/utils.go b/internal/engine/postgresql/utils.go index d0ddc392a1..b8d49b1a97 100644 --- a/internal/engine/postgresql/utils.go +++ b/internal/engine/postgresql/utils.go @@ -1,10 +1,7 @@ -//go:build !windows && cgo -// +build !windows,cgo - package postgresql import ( - nodes "github.com/pganalyze/pg_query_go/v4" + nodes "github.com/pganalyze/pg_query_go/v6" ) func isArray(n *nodes.TypeName) bool { diff --git a/internal/engine/sqlite/convert.go b/internal/engine/sqlite/convert.go index e941bb9121..658a9d7f33 100644 --- a/internal/engine/sqlite/convert.go +++ b/internal/engine/sqlite/convert.go @@ -6,8 +6,7 @@ import ( "strconv" "strings" - "github.com/antlr/antlr4/runtime/Go/antlr/v4" - + "github.com/antlr4-go/antlr/v4" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -43,7 +42,7 @@ func NewIdentifier(t string) *ast.String { func (c *cc) convertAlter_table_stmtContext(n *parser.Alter_table_stmtContext) ast.Node { if n.RENAME_() != nil { if newTable, ok := n.New_table_name().(*parser.New_table_nameContext); ok { - name := newTable.Any_name().GetText() + name := identifier(newTable.Any_name().GetText()) return &ast.RenameTableStmt{ Table: parseTableName(n), NewName: &name, @@ -51,11 +50,11 @@ func (c *cc) convertAlter_table_stmtContext(n *parser.Alter_table_stmtContext) a } if newCol, ok := n.GetNew_column_name().(*parser.Column_nameContext); ok { - name := newCol.Any_name().GetText() + name := identifier(newCol.Any_name().GetText()) return &ast.RenameColumnStmt{ Table: parseTableName(n), Col: &ast.ColumnRef{ - Name: n.GetOld_column_name().GetText(), + Name: identifier(n.GetOld_column_name().GetText()), }, NewName: &name, } @@ -204,7 +203,7 @@ type Delete_stmt interface { func (c *cc) convertDelete_stmtContext(n Delete_stmt) ast.Node { if qualifiedName, ok := n.Qualified_table_name().(*parser.Qualified_table_nameContext); ok { - tableName := qualifiedName.Table_name().GetText() + tableName := identifier(qualifiedName.Table_name().GetText()) relation := &ast.RangeVar{ Relname: &tableName, } @@ -255,7 +254,7 @@ func (c *cc) convertDelete_stmtContext(n Delete_stmt) ast.Node { func (c *cc) convertDrop_stmtContext(n *parser.Drop_stmtContext) ast.Node { if n.TABLE_() != nil || n.VIEW_() != nil { name := ast.TableName{ - Name: n.Any_name().GetText(), + Name: identifier(n.Any_name().GetText()), } if n.Schema_name() != nil { name.Schema = n.Schema_name().GetText() @@ -764,11 +763,11 @@ func (c *cc) convertLiteral(n *parser.Expr_literalContext) ast.Node { return todo("convertLiteral", n) } -func (c *cc) convertMathOperationNode(n *parser.Expr_math_opContext) ast.Node { +func (c *cc) convertBinaryNode(n *parser.Expr_binaryContext) ast.Node { return &ast.A_Expr{ Name: &ast.List{ Items: []ast.Node{ - &ast.String{Str: "+"}, // todo: Convert operation types + &ast.String{Str: n.GetChild(1).(antlr.TerminalNode).GetText()}, }, }, Lexpr: c.convert(n.Expr(0)), @@ -776,7 +775,7 @@ func (c *cc) convertMathOperationNode(n *parser.Expr_math_opContext) ast.Node { } } -func (c *cc) convertBinaryNode(n *parser.Expr_binaryContext) ast.Node { +func (c *cc) convertBoolNode(n *parser.Expr_boolContext) ast.Node { return &ast.BoolExpr{ // TODO: Set op Args: &ast.List{ @@ -855,7 +854,7 @@ func (c *cc) convertReturning_caluseContext(n parser.IReturning_clauseContext) * } func (c *cc) convertInsert_stmtContext(n *parser.Insert_stmtContext) ast.Node { - tableName := n.Table_name().GetText() + tableName := identifier(n.Table_name().GetText()) rel := &ast.RangeVar{ Relname: &tableName, } @@ -876,7 +875,25 @@ func (c *cc) convertInsert_stmtContext(n *parser.Insert_stmtContext) ast.Node { ReturningList: c.convertReturning_caluseContext(n.Returning_clause()), } - if n.Select_stmt() != nil { + // Check if this is a DEFAULT VALUES insert + hasDefaultValues := false + for _, child := range n.GetChildren() { + if term, ok := child.(antlr.TerminalNode); ok { + if term.GetSymbol().GetTokenType() == parser.SQLiteParserDEFAULT_ { + hasDefaultValues = true + break + } + } + } + + if hasDefaultValues { + // For DEFAULT VALUES, create an empty select statement + insert.SelectStmt = &ast.SelectStmt{ + FromClause: &ast.List{}, + TargetList: &ast.List{}, + ValuesLists: &ast.List{Items: []ast.Node{&ast.List{}}}, // Single empty values list + } + } else if n.Select_stmt() != nil { if ss, ok := c.convert(n.Select_stmt()).(*ast.SelectStmt); ok { ss.ValuesLists = &ast.List{} insert.SelectStmt = ss @@ -937,7 +954,7 @@ func (c *cc) convertTablesOrSubquery(n []parser.ITable_or_subqueryContext) []ast } if from.Table_name() != nil { - rel := from.Table_name().GetText() + rel := identifier(from.Table_name().GetText()) rv := &ast.RangeVar{ Relname: &rel, Location: from.GetStart().GetStart(), @@ -1018,7 +1035,7 @@ func (c *cc) convertUpdate_stmtContext(n Update_stmt) ast.Node { } relations := &ast.List{} - tableName := n.Qualified_table_name().GetText() + tableName := identifier(n.Qualified_table_name().GetText()) rel := ast.RangeVar{ Relname: &tableName, Location: n.GetStart().GetStart(), @@ -1096,6 +1113,28 @@ func (c *cc) convertCollateExpr(n *parser.Expr_collateContext) ast.Node { } } +func (c *cc) convertCase(n *parser.Expr_caseContext) ast.Node { + e := &ast.CaseExpr{ + Args: &ast.List{}, + } + es := n.AllExpr() + if n.ELSE_() != nil { + e.Defresult = c.convert(es[len(es)-1]) + es = es[:len(es)-1] + } + if len(es)%2 == 1 { + e.Arg = c.convert(es[0]) + es = es[1:] + } + for i := 0; i < len(es); i += 2 { + e.Args.Items = append(e.Args.Items, &ast.CaseWhen{ + Expr: c.convert(es[i+0]), + Result: c.convert(es[i+1]), + }) + } + return e +} + func (c *cc) convert(node node) ast.Node { switch n := node.(type) { @@ -1141,14 +1180,14 @@ func (c *cc) convert(node node) ast.Node { case *parser.Expr_literalContext: return c.convertLiteral(n) - case *parser.Expr_binaryContext: - return c.convertBinaryNode(n) + case *parser.Expr_boolContext: + return c.convertBoolNode(n) case *parser.Expr_listContext: return c.convertExprListContext(n) - case *parser.Expr_math_opContext: - return c.convertMathOperationNode(n) + case *parser.Expr_binaryContext: + return c.convertBinaryNode(n) case *parser.Expr_in_selectContext: return c.convertInSelectNode(n) @@ -1184,6 +1223,9 @@ func (c *cc) convert(node node) ast.Node { case *parser.Expr_castContext: return c.convertCastExpr(n) + case *parser.Expr_caseContext: + return c.convertCase(n) + default: return todo("convert(case=default)", n) } diff --git a/internal/engine/sqlite/parse.go b/internal/engine/sqlite/parse.go index 56005dd2ee..13425b156e 100644 --- a/internal/engine/sqlite/parse.go +++ b/internal/engine/sqlite/parse.go @@ -5,8 +5,7 @@ import ( "fmt" "io" - "github.com/antlr/antlr4/runtime/Go/antlr/v4" - + "github.com/antlr4-go/antlr/v4" "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" @@ -70,6 +69,7 @@ func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { converter := &cc{} out := converter.convert(stmt) if _, ok := out.(*ast.TODO); ok { + loc = stmt.GetStop().GetStop() + 2 continue } len := (stmt.GetStop().GetStop() + 1) - loc diff --git a/internal/engine/sqlite/parser/Makefile b/internal/engine/sqlite/parser/Makefile index b925a1f6c1..bacae8a36b 100644 --- a/internal/engine/sqlite/parser/Makefile +++ b/internal/engine/sqlite/parser/Makefile @@ -1,7 +1,7 @@ -sqlite_parser.go: SQLiteLexer.g4 SQLiteParser.g4 antlr-4.12.0-complete.jar - java -jar antlr-4.12.0-complete.jar -Dlanguage=Go SQLiteLexer.g4 SQLiteParser.g4 +sqlite_parser.go: SQLiteLexer.g4 SQLiteParser.g4 antlr-4.13.1-complete.jar + java -jar antlr-4.13.1-complete.jar -Dlanguage=Go SQLiteLexer.g4 SQLiteParser.g4 -antlr-4.12.0-complete.jar: - curl -O https://www.antlr.org/download/antlr-4.12.0-complete.jar +antlr-4.13.1-complete.jar: + curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar diff --git a/internal/engine/sqlite/parser/SQLiteLexer.g4 b/internal/engine/sqlite/parser/SQLiteLexer.g4 index d7f7c97197..5110ed44c7 100644 --- a/internal/engine/sqlite/parser/SQLiteLexer.g4 +++ b/internal/engine/sqlite/parser/SQLiteLexer.g4 @@ -35,6 +35,8 @@ COMMA: ','; ASSIGN: '='; STAR: '*'; PLUS: '+'; +PTR2: '->>'; +PTR: '->'; MINUS: '-'; TILDE: '~'; PIPE2: '||'; diff --git a/internal/engine/sqlite/parser/SQLiteLexer.interp b/internal/engine/sqlite/parser/SQLiteLexer.interp index 9b6f7ec3e8..329996c296 100644 --- a/internal/engine/sqlite/parser/SQLiteLexer.interp +++ b/internal/engine/sqlite/parser/SQLiteLexer.interp @@ -8,6 +8,8 @@ null '=' '*' '+' +'->>' +'->' '-' '~' '||' @@ -206,6 +208,8 @@ COMMA ASSIGN STAR PLUS +PTR2 +PTR MINUS TILDE PIPE2 @@ -403,6 +407,8 @@ COMMA ASSIGN STAR PLUS +PTR2 +PTR MINUS TILDE PIPE2 @@ -627,4 +633,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 195, 1818, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 5, 185, 1625, 8, 185, 10, 185, 12, 185, 1628, 9, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 5, 185, 1635, 8, 185, 10, 185, 12, 185, 1638, 9, 185, 1, 185, 1, 185, 1, 185, 5, 185, 1643, 8, 185, 10, 185, 12, 185, 1646, 9, 185, 1, 185, 1, 185, 1, 185, 5, 185, 1651, 8, 185, 10, 185, 12, 185, 1654, 9, 185, 3, 185, 1656, 8, 185, 1, 186, 4, 186, 1659, 8, 186, 11, 186, 12, 186, 1660, 1, 186, 1, 186, 5, 186, 1665, 8, 186, 10, 186, 12, 186, 1668, 9, 186, 3, 186, 1670, 8, 186, 1, 186, 1, 186, 4, 186, 1674, 8, 186, 11, 186, 12, 186, 1675, 3, 186, 1678, 8, 186, 1, 186, 1, 186, 3, 186, 1682, 8, 186, 1, 186, 4, 186, 1685, 8, 186, 11, 186, 12, 186, 1686, 3, 186, 1689, 8, 186, 1, 186, 1, 186, 1, 186, 1, 186, 4, 186, 1695, 8, 186, 11, 186, 12, 186, 1696, 3, 186, 1699, 8, 186, 1, 187, 1, 187, 5, 187, 1703, 8, 187, 10, 187, 12, 187, 1706, 9, 187, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 189, 5, 189, 1715, 8, 189, 10, 189, 12, 189, 1718, 9, 189, 1, 189, 1, 189, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 5, 191, 1729, 8, 191, 10, 191, 12, 191, 1732, 9, 191, 1, 191, 3, 191, 1735, 8, 191, 1, 191, 1, 191, 3, 191, 1739, 8, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 192, 5, 192, 1747, 8, 192, 10, 192, 12, 192, 1750, 9, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, 195, 1, 195, 1, 196, 1, 196, 1, 197, 1, 197, 1, 198, 1, 198, 1, 199, 1, 199, 1, 200, 1, 200, 1, 201, 1, 201, 1, 202, 1, 202, 1, 203, 1, 203, 1, 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 1, 207, 1, 207, 1, 208, 1, 208, 1, 209, 1, 209, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, 213, 1, 213, 1, 214, 1, 214, 1, 215, 1, 215, 1, 216, 1, 216, 1, 217, 1, 217, 1, 218, 1, 218, 1, 219, 1, 219, 1, 220, 1, 220, 1, 221, 1, 221, 1, 222, 1, 222, 1, 1748, 0, 223, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 0, 393, 0, 395, 0, 397, 0, 399, 0, 401, 0, 403, 0, 405, 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, 0, 417, 0, 419, 0, 421, 0, 423, 0, 425, 0, 427, 0, 429, 0, 431, 0, 433, 0, 435, 0, 437, 0, 439, 0, 441, 0, 443, 0, 445, 0, 1, 0, 38, 1, 0, 34, 34, 1, 0, 96, 96, 1, 0, 93, 93, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 43, 43, 45, 45, 3, 0, 36, 36, 58, 58, 64, 64, 1, 0, 39, 39, 2, 0, 10, 10, 13, 13, 3, 0, 9, 11, 13, 13, 32, 32, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 57, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 1815, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 1, 447, 1, 0, 0, 0, 3, 449, 1, 0, 0, 0, 5, 451, 1, 0, 0, 0, 7, 453, 1, 0, 0, 0, 9, 455, 1, 0, 0, 0, 11, 457, 1, 0, 0, 0, 13, 459, 1, 0, 0, 0, 15, 461, 1, 0, 0, 0, 17, 463, 1, 0, 0, 0, 19, 465, 1, 0, 0, 0, 21, 467, 1, 0, 0, 0, 23, 470, 1, 0, 0, 0, 25, 472, 1, 0, 0, 0, 27, 474, 1, 0, 0, 0, 29, 477, 1, 0, 0, 0, 31, 480, 1, 0, 0, 0, 33, 482, 1, 0, 0, 0, 35, 484, 1, 0, 0, 0, 37, 486, 1, 0, 0, 0, 39, 489, 1, 0, 0, 0, 41, 491, 1, 0, 0, 0, 43, 494, 1, 0, 0, 0, 45, 497, 1, 0, 0, 0, 47, 500, 1, 0, 0, 0, 49, 503, 1, 0, 0, 0, 51, 509, 1, 0, 0, 0, 53, 516, 1, 0, 0, 0, 55, 520, 1, 0, 0, 0, 57, 526, 1, 0, 0, 0, 59, 530, 1, 0, 0, 0, 61, 536, 1, 0, 0, 0, 63, 544, 1, 0, 0, 0, 65, 548, 1, 0, 0, 0, 67, 551, 1, 0, 0, 0, 69, 555, 1, 0, 0, 0, 71, 562, 1, 0, 0, 0, 73, 576, 1, 0, 0, 0, 75, 583, 1, 0, 0, 0, 77, 589, 1, 0, 0, 0, 79, 597, 1, 0, 0, 0, 81, 600, 1, 0, 0, 0, 83, 608, 1, 0, 0, 0, 85, 613, 1, 0, 0, 0, 87, 618, 1, 0, 0, 0, 89, 624, 1, 0, 0, 0, 91, 632, 1, 0, 0, 0, 93, 639, 1, 0, 0, 0, 95, 646, 1, 0, 0, 0, 97, 655, 1, 0, 0, 0, 99, 666, 1, 0, 0, 0, 101, 673, 1, 0, 0, 0, 103, 679, 1, 0, 0, 0, 105, 692, 1, 0, 0, 0, 107, 705, 1, 0, 0, 0, 109, 723, 1, 0, 0, 0, 111, 732, 1, 0, 0, 0, 113, 740, 1, 0, 0, 0, 115, 751, 1, 0, 0, 0, 117, 760, 1, 0, 0, 0, 119, 767, 1, 0, 0, 0, 121, 772, 1, 0, 0, 0, 123, 779, 1, 0, 0, 0, 125, 788, 1, 0, 0, 0, 127, 793, 1, 0, 0, 0, 129, 798, 1, 0, 0, 0, 131, 803, 1, 0, 0, 0, 133, 807, 1, 0, 0, 0, 135, 814, 1, 0, 0, 0, 137, 821, 1, 0, 0, 0, 139, 831, 1, 0, 0, 0, 141, 838, 1, 0, 0, 0, 143, 846, 1, 0, 0, 0, 145, 851, 1, 0, 0, 0, 147, 855, 1, 0, 0, 0, 149, 863, 1, 0, 0, 0, 151, 868, 1, 0, 0, 0, 153, 873, 1, 0, 0, 0, 155, 878, 1, 0, 0, 0, 157, 884, 1, 0, 0, 0, 159, 891, 1, 0, 0, 0, 161, 894, 1, 0, 0, 0, 163, 901, 1, 0, 0, 0, 165, 911, 1, 0, 0, 0, 167, 914, 1, 0, 0, 0, 169, 920, 1, 0, 0, 0, 171, 928, 1, 0, 0, 0, 173, 938, 1, 0, 0, 0, 175, 944, 1, 0, 0, 0, 177, 951, 1, 0, 0, 0, 179, 959, 1, 0, 0, 0, 181, 969, 1, 0, 0, 0, 183, 974, 1, 0, 0, 0, 185, 977, 1, 0, 0, 0, 187, 984, 1, 0, 0, 0, 189, 989, 1, 0, 0, 0, 191, 993, 1, 0, 0, 0, 193, 998, 1, 0, 0, 0, 195, 1003, 1, 0, 0, 0, 197, 1009, 1, 0, 0, 0, 199, 1015, 1, 0, 0, 0, 201, 1023, 1, 0, 0, 0, 203, 1026, 1, 0, 0, 0, 205, 1030, 1, 0, 0, 0, 207, 1038, 1, 0, 0, 0, 209, 1043, 1, 0, 0, 0, 211, 1046, 1, 0, 0, 0, 213, 1053, 1, 0, 0, 0, 215, 1056, 1, 0, 0, 0, 217, 1059, 1, 0, 0, 0, 219, 1065, 1, 0, 0, 0, 221, 1071, 1, 0, 0, 0, 223, 1076, 1, 0, 0, 0, 225, 1083, 1, 0, 0, 0, 227, 1091, 1, 0, 0, 0, 229, 1097, 1, 0, 0, 0, 231, 1103, 1, 0, 0, 0, 233, 1113, 1, 0, 0, 0, 235, 1124, 1, 0, 0, 0, 237, 1131, 1, 0, 0, 0, 239, 1139, 1, 0, 0, 0, 241, 1147, 1, 0, 0, 0, 243, 1154, 1, 0, 0, 0, 245, 1162, 1, 0, 0, 0, 247, 1171, 1, 0, 0, 0, 249, 1181, 1, 0, 0, 0, 251, 1187, 1, 0, 0, 0, 253, 1196, 1, 0, 0, 0, 255, 1200, 1, 0, 0, 0, 257, 1205, 1, 0, 0, 0, 259, 1215, 1, 0, 0, 0, 261, 1222, 1, 0, 0, 0, 263, 1226, 1, 0, 0, 0, 265, 1233, 1, 0, 0, 0, 267, 1239, 1, 0, 0, 0, 269, 1244, 1, 0, 0, 0, 271, 1254, 1, 0, 0, 0, 273, 1259, 1, 0, 0, 0, 275, 1262, 1, 0, 0, 0, 277, 1274, 1, 0, 0, 0, 279, 1282, 1, 0, 0, 0, 281, 1288, 1, 0, 0, 0, 283, 1295, 1, 0, 0, 0, 285, 1302, 1, 0, 0, 0, 287, 1308, 1, 0, 0, 0, 289, 1315, 1, 0, 0, 0, 291, 1322, 1, 0, 0, 0, 293, 1327, 1, 0, 0, 0, 295, 1335, 1, 0, 0, 0, 297, 1340, 1, 0, 0, 0, 299, 1346, 1, 0, 0, 0, 301, 1351, 1, 0, 0, 0, 303, 1359, 1, 0, 0, 0, 305, 1371, 1, 0, 0, 0, 307, 1376, 1, 0, 0, 0, 309, 1386, 1, 0, 0, 0, 311, 1392, 1, 0, 0, 0, 313, 1402, 1, 0, 0, 0, 315, 1412, 1, 0, 0, 0, 317, 1420, 1, 0, 0, 0, 319, 1430, 1, 0, 0, 0, 321, 1440, 1, 0, 0, 0, 323, 1451, 1, 0, 0, 0, 325, 1455, 1, 0, 0, 0, 327, 1466, 1, 0, 0, 0, 329, 1471, 1, 0, 0, 0, 331, 1481, 1, 0, 0, 0, 333, 1487, 1, 0, 0, 0, 335, 1500, 1, 0, 0, 0, 337, 1505, 1, 0, 0, 0, 339, 1516, 1, 0, 0, 0, 341, 1526, 1, 0, 0, 0, 343, 1533, 1, 0, 0, 0, 345, 1540, 1, 0, 0, 0, 347, 1545, 1, 0, 0, 0, 349, 1551, 1, 0, 0, 0, 351, 1558, 1, 0, 0, 0, 353, 1564, 1, 0, 0, 0, 355, 1570, 1, 0, 0, 0, 357, 1575, 1, 0, 0, 0, 359, 1582, 1, 0, 0, 0, 361, 1589, 1, 0, 0, 0, 363, 1597, 1, 0, 0, 0, 365, 1602, 1, 0, 0, 0, 367, 1609, 1, 0, 0, 0, 369, 1612, 1, 0, 0, 0, 371, 1655, 1, 0, 0, 0, 373, 1698, 1, 0, 0, 0, 375, 1700, 1, 0, 0, 0, 377, 1707, 1, 0, 0, 0, 379, 1710, 1, 0, 0, 0, 381, 1721, 1, 0, 0, 0, 383, 1724, 1, 0, 0, 0, 385, 1742, 1, 0, 0, 0, 387, 1756, 1, 0, 0, 0, 389, 1760, 1, 0, 0, 0, 391, 1762, 1, 0, 0, 0, 393, 1764, 1, 0, 0, 0, 395, 1766, 1, 0, 0, 0, 397, 1768, 1, 0, 0, 0, 399, 1770, 1, 0, 0, 0, 401, 1772, 1, 0, 0, 0, 403, 1774, 1, 0, 0, 0, 405, 1776, 1, 0, 0, 0, 407, 1778, 1, 0, 0, 0, 409, 1780, 1, 0, 0, 0, 411, 1782, 1, 0, 0, 0, 413, 1784, 1, 0, 0, 0, 415, 1786, 1, 0, 0, 0, 417, 1788, 1, 0, 0, 0, 419, 1790, 1, 0, 0, 0, 421, 1792, 1, 0, 0, 0, 423, 1794, 1, 0, 0, 0, 425, 1796, 1, 0, 0, 0, 427, 1798, 1, 0, 0, 0, 429, 1800, 1, 0, 0, 0, 431, 1802, 1, 0, 0, 0, 433, 1804, 1, 0, 0, 0, 435, 1806, 1, 0, 0, 0, 437, 1808, 1, 0, 0, 0, 439, 1810, 1, 0, 0, 0, 441, 1812, 1, 0, 0, 0, 443, 1814, 1, 0, 0, 0, 445, 1816, 1, 0, 0, 0, 447, 448, 5, 59, 0, 0, 448, 2, 1, 0, 0, 0, 449, 450, 5, 46, 0, 0, 450, 4, 1, 0, 0, 0, 451, 452, 5, 40, 0, 0, 452, 6, 1, 0, 0, 0, 453, 454, 5, 41, 0, 0, 454, 8, 1, 0, 0, 0, 455, 456, 5, 44, 0, 0, 456, 10, 1, 0, 0, 0, 457, 458, 5, 61, 0, 0, 458, 12, 1, 0, 0, 0, 459, 460, 5, 42, 0, 0, 460, 14, 1, 0, 0, 0, 461, 462, 5, 43, 0, 0, 462, 16, 1, 0, 0, 0, 463, 464, 5, 45, 0, 0, 464, 18, 1, 0, 0, 0, 465, 466, 5, 126, 0, 0, 466, 20, 1, 0, 0, 0, 467, 468, 5, 124, 0, 0, 468, 469, 5, 124, 0, 0, 469, 22, 1, 0, 0, 0, 470, 471, 5, 47, 0, 0, 471, 24, 1, 0, 0, 0, 472, 473, 5, 37, 0, 0, 473, 26, 1, 0, 0, 0, 474, 475, 5, 60, 0, 0, 475, 476, 5, 60, 0, 0, 476, 28, 1, 0, 0, 0, 477, 478, 5, 62, 0, 0, 478, 479, 5, 62, 0, 0, 479, 30, 1, 0, 0, 0, 480, 481, 5, 38, 0, 0, 481, 32, 1, 0, 0, 0, 482, 483, 5, 124, 0, 0, 483, 34, 1, 0, 0, 0, 484, 485, 5, 60, 0, 0, 485, 36, 1, 0, 0, 0, 486, 487, 5, 60, 0, 0, 487, 488, 5, 61, 0, 0, 488, 38, 1, 0, 0, 0, 489, 490, 5, 62, 0, 0, 490, 40, 1, 0, 0, 0, 491, 492, 5, 62, 0, 0, 492, 493, 5, 61, 0, 0, 493, 42, 1, 0, 0, 0, 494, 495, 5, 61, 0, 0, 495, 496, 5, 61, 0, 0, 496, 44, 1, 0, 0, 0, 497, 498, 5, 33, 0, 0, 498, 499, 5, 61, 0, 0, 499, 46, 1, 0, 0, 0, 500, 501, 5, 60, 0, 0, 501, 502, 5, 62, 0, 0, 502, 48, 1, 0, 0, 0, 503, 504, 3, 395, 197, 0, 504, 505, 3, 397, 198, 0, 505, 506, 3, 423, 211, 0, 506, 507, 3, 429, 214, 0, 507, 508, 3, 433, 216, 0, 508, 50, 1, 0, 0, 0, 509, 510, 3, 395, 197, 0, 510, 511, 3, 399, 199, 0, 511, 512, 3, 433, 216, 0, 512, 513, 3, 411, 205, 0, 513, 514, 3, 423, 211, 0, 514, 515, 3, 421, 210, 0, 515, 52, 1, 0, 0, 0, 516, 517, 3, 395, 197, 0, 517, 518, 3, 401, 200, 0, 518, 519, 3, 401, 200, 0, 519, 54, 1, 0, 0, 0, 520, 521, 3, 395, 197, 0, 521, 522, 3, 405, 202, 0, 522, 523, 3, 433, 216, 0, 523, 524, 3, 403, 201, 0, 524, 525, 3, 429, 214, 0, 525, 56, 1, 0, 0, 0, 526, 527, 3, 395, 197, 0, 527, 528, 3, 417, 208, 0, 528, 529, 3, 417, 208, 0, 529, 58, 1, 0, 0, 0, 530, 531, 3, 395, 197, 0, 531, 532, 3, 417, 208, 0, 532, 533, 3, 433, 216, 0, 533, 534, 3, 403, 201, 0, 534, 535, 3, 429, 214, 0, 535, 60, 1, 0, 0, 0, 536, 537, 3, 395, 197, 0, 537, 538, 3, 421, 210, 0, 538, 539, 3, 395, 197, 0, 539, 540, 3, 417, 208, 0, 540, 541, 3, 443, 221, 0, 541, 542, 3, 445, 222, 0, 542, 543, 3, 403, 201, 0, 543, 62, 1, 0, 0, 0, 544, 545, 3, 395, 197, 0, 545, 546, 3, 421, 210, 0, 546, 547, 3, 401, 200, 0, 547, 64, 1, 0, 0, 0, 548, 549, 3, 395, 197, 0, 549, 550, 3, 431, 215, 0, 550, 66, 1, 0, 0, 0, 551, 552, 3, 395, 197, 0, 552, 553, 3, 431, 215, 0, 553, 554, 3, 399, 199, 0, 554, 68, 1, 0, 0, 0, 555, 556, 3, 395, 197, 0, 556, 557, 3, 433, 216, 0, 557, 558, 3, 433, 216, 0, 558, 559, 3, 395, 197, 0, 559, 560, 3, 399, 199, 0, 560, 561, 3, 409, 204, 0, 561, 70, 1, 0, 0, 0, 562, 563, 3, 395, 197, 0, 563, 564, 3, 435, 217, 0, 564, 565, 3, 433, 216, 0, 565, 566, 3, 423, 211, 0, 566, 567, 3, 411, 205, 0, 567, 568, 3, 421, 210, 0, 568, 569, 3, 399, 199, 0, 569, 570, 3, 429, 214, 0, 570, 571, 3, 403, 201, 0, 571, 572, 3, 419, 209, 0, 572, 573, 3, 403, 201, 0, 573, 574, 3, 421, 210, 0, 574, 575, 3, 433, 216, 0, 575, 72, 1, 0, 0, 0, 576, 577, 3, 397, 198, 0, 577, 578, 3, 403, 201, 0, 578, 579, 3, 405, 202, 0, 579, 580, 3, 423, 211, 0, 580, 581, 3, 429, 214, 0, 581, 582, 3, 403, 201, 0, 582, 74, 1, 0, 0, 0, 583, 584, 3, 397, 198, 0, 584, 585, 3, 403, 201, 0, 585, 586, 3, 407, 203, 0, 586, 587, 3, 411, 205, 0, 587, 588, 3, 421, 210, 0, 588, 76, 1, 0, 0, 0, 589, 590, 3, 397, 198, 0, 590, 591, 3, 403, 201, 0, 591, 592, 3, 433, 216, 0, 592, 593, 3, 439, 219, 0, 593, 594, 3, 403, 201, 0, 594, 595, 3, 403, 201, 0, 595, 596, 3, 421, 210, 0, 596, 78, 1, 0, 0, 0, 597, 598, 3, 397, 198, 0, 598, 599, 3, 443, 221, 0, 599, 80, 1, 0, 0, 0, 600, 601, 3, 399, 199, 0, 601, 602, 3, 395, 197, 0, 602, 603, 3, 431, 215, 0, 603, 604, 3, 399, 199, 0, 604, 605, 3, 395, 197, 0, 605, 606, 3, 401, 200, 0, 606, 607, 3, 403, 201, 0, 607, 82, 1, 0, 0, 0, 608, 609, 3, 399, 199, 0, 609, 610, 3, 395, 197, 0, 610, 611, 3, 431, 215, 0, 611, 612, 3, 403, 201, 0, 612, 84, 1, 0, 0, 0, 613, 614, 3, 399, 199, 0, 614, 615, 3, 395, 197, 0, 615, 616, 3, 431, 215, 0, 616, 617, 3, 433, 216, 0, 617, 86, 1, 0, 0, 0, 618, 619, 3, 399, 199, 0, 619, 620, 3, 409, 204, 0, 620, 621, 3, 403, 201, 0, 621, 622, 3, 399, 199, 0, 622, 623, 3, 415, 207, 0, 623, 88, 1, 0, 0, 0, 624, 625, 3, 399, 199, 0, 625, 626, 3, 423, 211, 0, 626, 627, 3, 417, 208, 0, 627, 628, 3, 417, 208, 0, 628, 629, 3, 395, 197, 0, 629, 630, 3, 433, 216, 0, 630, 631, 3, 403, 201, 0, 631, 90, 1, 0, 0, 0, 632, 633, 3, 399, 199, 0, 633, 634, 3, 423, 211, 0, 634, 635, 3, 417, 208, 0, 635, 636, 3, 435, 217, 0, 636, 637, 3, 419, 209, 0, 637, 638, 3, 421, 210, 0, 638, 92, 1, 0, 0, 0, 639, 640, 3, 399, 199, 0, 640, 641, 3, 423, 211, 0, 641, 642, 3, 419, 209, 0, 642, 643, 3, 419, 209, 0, 643, 644, 3, 411, 205, 0, 644, 645, 3, 433, 216, 0, 645, 94, 1, 0, 0, 0, 646, 647, 3, 399, 199, 0, 647, 648, 3, 423, 211, 0, 648, 649, 3, 421, 210, 0, 649, 650, 3, 405, 202, 0, 650, 651, 3, 417, 208, 0, 651, 652, 3, 411, 205, 0, 652, 653, 3, 399, 199, 0, 653, 654, 3, 433, 216, 0, 654, 96, 1, 0, 0, 0, 655, 656, 3, 399, 199, 0, 656, 657, 3, 423, 211, 0, 657, 658, 3, 421, 210, 0, 658, 659, 3, 431, 215, 0, 659, 660, 3, 433, 216, 0, 660, 661, 3, 429, 214, 0, 661, 662, 3, 395, 197, 0, 662, 663, 3, 411, 205, 0, 663, 664, 3, 421, 210, 0, 664, 665, 3, 433, 216, 0, 665, 98, 1, 0, 0, 0, 666, 667, 3, 399, 199, 0, 667, 668, 3, 429, 214, 0, 668, 669, 3, 403, 201, 0, 669, 670, 3, 395, 197, 0, 670, 671, 3, 433, 216, 0, 671, 672, 3, 403, 201, 0, 672, 100, 1, 0, 0, 0, 673, 674, 3, 399, 199, 0, 674, 675, 3, 429, 214, 0, 675, 676, 3, 423, 211, 0, 676, 677, 3, 431, 215, 0, 677, 678, 3, 431, 215, 0, 678, 102, 1, 0, 0, 0, 679, 680, 3, 399, 199, 0, 680, 681, 3, 435, 217, 0, 681, 682, 3, 429, 214, 0, 682, 683, 3, 429, 214, 0, 683, 684, 3, 403, 201, 0, 684, 685, 3, 421, 210, 0, 685, 686, 3, 433, 216, 0, 686, 687, 5, 95, 0, 0, 687, 688, 3, 401, 200, 0, 688, 689, 3, 395, 197, 0, 689, 690, 3, 433, 216, 0, 690, 691, 3, 403, 201, 0, 691, 104, 1, 0, 0, 0, 692, 693, 3, 399, 199, 0, 693, 694, 3, 435, 217, 0, 694, 695, 3, 429, 214, 0, 695, 696, 3, 429, 214, 0, 696, 697, 3, 403, 201, 0, 697, 698, 3, 421, 210, 0, 698, 699, 3, 433, 216, 0, 699, 700, 5, 95, 0, 0, 700, 701, 3, 433, 216, 0, 701, 702, 3, 411, 205, 0, 702, 703, 3, 419, 209, 0, 703, 704, 3, 403, 201, 0, 704, 106, 1, 0, 0, 0, 705, 706, 3, 399, 199, 0, 706, 707, 3, 435, 217, 0, 707, 708, 3, 429, 214, 0, 708, 709, 3, 429, 214, 0, 709, 710, 3, 403, 201, 0, 710, 711, 3, 421, 210, 0, 711, 712, 3, 433, 216, 0, 712, 713, 5, 95, 0, 0, 713, 714, 3, 433, 216, 0, 714, 715, 3, 411, 205, 0, 715, 716, 3, 419, 209, 0, 716, 717, 3, 403, 201, 0, 717, 718, 3, 431, 215, 0, 718, 719, 3, 433, 216, 0, 719, 720, 3, 395, 197, 0, 720, 721, 3, 419, 209, 0, 721, 722, 3, 425, 212, 0, 722, 108, 1, 0, 0, 0, 723, 724, 3, 401, 200, 0, 724, 725, 3, 395, 197, 0, 725, 726, 3, 433, 216, 0, 726, 727, 3, 395, 197, 0, 727, 728, 3, 397, 198, 0, 728, 729, 3, 395, 197, 0, 729, 730, 3, 431, 215, 0, 730, 731, 3, 403, 201, 0, 731, 110, 1, 0, 0, 0, 732, 733, 3, 401, 200, 0, 733, 734, 3, 403, 201, 0, 734, 735, 3, 405, 202, 0, 735, 736, 3, 395, 197, 0, 736, 737, 3, 435, 217, 0, 737, 738, 3, 417, 208, 0, 738, 739, 3, 433, 216, 0, 739, 112, 1, 0, 0, 0, 740, 741, 3, 401, 200, 0, 741, 742, 3, 403, 201, 0, 742, 743, 3, 405, 202, 0, 743, 744, 3, 403, 201, 0, 744, 745, 3, 429, 214, 0, 745, 746, 3, 429, 214, 0, 746, 747, 3, 395, 197, 0, 747, 748, 3, 397, 198, 0, 748, 749, 3, 417, 208, 0, 749, 750, 3, 403, 201, 0, 750, 114, 1, 0, 0, 0, 751, 752, 3, 401, 200, 0, 752, 753, 3, 403, 201, 0, 753, 754, 3, 405, 202, 0, 754, 755, 3, 403, 201, 0, 755, 756, 3, 429, 214, 0, 756, 757, 3, 429, 214, 0, 757, 758, 3, 403, 201, 0, 758, 759, 3, 401, 200, 0, 759, 116, 1, 0, 0, 0, 760, 761, 3, 401, 200, 0, 761, 762, 3, 403, 201, 0, 762, 763, 3, 417, 208, 0, 763, 764, 3, 403, 201, 0, 764, 765, 3, 433, 216, 0, 765, 766, 3, 403, 201, 0, 766, 118, 1, 0, 0, 0, 767, 768, 3, 401, 200, 0, 768, 769, 3, 403, 201, 0, 769, 770, 3, 431, 215, 0, 770, 771, 3, 399, 199, 0, 771, 120, 1, 0, 0, 0, 772, 773, 3, 401, 200, 0, 773, 774, 3, 403, 201, 0, 774, 775, 3, 433, 216, 0, 775, 776, 3, 395, 197, 0, 776, 777, 3, 399, 199, 0, 777, 778, 3, 409, 204, 0, 778, 122, 1, 0, 0, 0, 779, 780, 3, 401, 200, 0, 780, 781, 3, 411, 205, 0, 781, 782, 3, 431, 215, 0, 782, 783, 3, 433, 216, 0, 783, 784, 3, 411, 205, 0, 784, 785, 3, 421, 210, 0, 785, 786, 3, 399, 199, 0, 786, 787, 3, 433, 216, 0, 787, 124, 1, 0, 0, 0, 788, 789, 3, 401, 200, 0, 789, 790, 3, 429, 214, 0, 790, 791, 3, 423, 211, 0, 791, 792, 3, 425, 212, 0, 792, 126, 1, 0, 0, 0, 793, 794, 3, 403, 201, 0, 794, 795, 3, 395, 197, 0, 795, 796, 3, 399, 199, 0, 796, 797, 3, 409, 204, 0, 797, 128, 1, 0, 0, 0, 798, 799, 3, 403, 201, 0, 799, 800, 3, 417, 208, 0, 800, 801, 3, 431, 215, 0, 801, 802, 3, 403, 201, 0, 802, 130, 1, 0, 0, 0, 803, 804, 3, 403, 201, 0, 804, 805, 3, 421, 210, 0, 805, 806, 3, 401, 200, 0, 806, 132, 1, 0, 0, 0, 807, 808, 3, 403, 201, 0, 808, 809, 3, 431, 215, 0, 809, 810, 3, 399, 199, 0, 810, 811, 3, 395, 197, 0, 811, 812, 3, 425, 212, 0, 812, 813, 3, 403, 201, 0, 813, 134, 1, 0, 0, 0, 814, 815, 3, 403, 201, 0, 815, 816, 3, 441, 220, 0, 816, 817, 3, 399, 199, 0, 817, 818, 3, 403, 201, 0, 818, 819, 3, 425, 212, 0, 819, 820, 3, 433, 216, 0, 820, 136, 1, 0, 0, 0, 821, 822, 3, 403, 201, 0, 822, 823, 3, 441, 220, 0, 823, 824, 3, 399, 199, 0, 824, 825, 3, 417, 208, 0, 825, 826, 3, 435, 217, 0, 826, 827, 3, 431, 215, 0, 827, 828, 3, 411, 205, 0, 828, 829, 3, 437, 218, 0, 829, 830, 3, 403, 201, 0, 830, 138, 1, 0, 0, 0, 831, 832, 3, 403, 201, 0, 832, 833, 3, 441, 220, 0, 833, 834, 3, 411, 205, 0, 834, 835, 3, 431, 215, 0, 835, 836, 3, 433, 216, 0, 836, 837, 3, 431, 215, 0, 837, 140, 1, 0, 0, 0, 838, 839, 3, 403, 201, 0, 839, 840, 3, 441, 220, 0, 840, 841, 3, 425, 212, 0, 841, 842, 3, 417, 208, 0, 842, 843, 3, 395, 197, 0, 843, 844, 3, 411, 205, 0, 844, 845, 3, 421, 210, 0, 845, 142, 1, 0, 0, 0, 846, 847, 3, 405, 202, 0, 847, 848, 3, 395, 197, 0, 848, 849, 3, 411, 205, 0, 849, 850, 3, 417, 208, 0, 850, 144, 1, 0, 0, 0, 851, 852, 3, 405, 202, 0, 852, 853, 3, 423, 211, 0, 853, 854, 3, 429, 214, 0, 854, 146, 1, 0, 0, 0, 855, 856, 3, 405, 202, 0, 856, 857, 3, 423, 211, 0, 857, 858, 3, 429, 214, 0, 858, 859, 3, 403, 201, 0, 859, 860, 3, 411, 205, 0, 860, 861, 3, 407, 203, 0, 861, 862, 3, 421, 210, 0, 862, 148, 1, 0, 0, 0, 863, 864, 3, 405, 202, 0, 864, 865, 3, 429, 214, 0, 865, 866, 3, 423, 211, 0, 866, 867, 3, 419, 209, 0, 867, 150, 1, 0, 0, 0, 868, 869, 3, 405, 202, 0, 869, 870, 3, 435, 217, 0, 870, 871, 3, 417, 208, 0, 871, 872, 3, 417, 208, 0, 872, 152, 1, 0, 0, 0, 873, 874, 3, 407, 203, 0, 874, 875, 3, 417, 208, 0, 875, 876, 3, 423, 211, 0, 876, 877, 3, 397, 198, 0, 877, 154, 1, 0, 0, 0, 878, 879, 3, 407, 203, 0, 879, 880, 3, 429, 214, 0, 880, 881, 3, 423, 211, 0, 881, 882, 3, 435, 217, 0, 882, 883, 3, 425, 212, 0, 883, 156, 1, 0, 0, 0, 884, 885, 3, 409, 204, 0, 885, 886, 3, 395, 197, 0, 886, 887, 3, 437, 218, 0, 887, 888, 3, 411, 205, 0, 888, 889, 3, 421, 210, 0, 889, 890, 3, 407, 203, 0, 890, 158, 1, 0, 0, 0, 891, 892, 3, 411, 205, 0, 892, 893, 3, 405, 202, 0, 893, 160, 1, 0, 0, 0, 894, 895, 3, 411, 205, 0, 895, 896, 3, 407, 203, 0, 896, 897, 3, 421, 210, 0, 897, 898, 3, 423, 211, 0, 898, 899, 3, 429, 214, 0, 899, 900, 3, 403, 201, 0, 900, 162, 1, 0, 0, 0, 901, 902, 3, 411, 205, 0, 902, 903, 3, 419, 209, 0, 903, 904, 3, 419, 209, 0, 904, 905, 3, 403, 201, 0, 905, 906, 3, 401, 200, 0, 906, 907, 3, 411, 205, 0, 907, 908, 3, 395, 197, 0, 908, 909, 3, 433, 216, 0, 909, 910, 3, 403, 201, 0, 910, 164, 1, 0, 0, 0, 911, 912, 3, 411, 205, 0, 912, 913, 3, 421, 210, 0, 913, 166, 1, 0, 0, 0, 914, 915, 3, 411, 205, 0, 915, 916, 3, 421, 210, 0, 916, 917, 3, 401, 200, 0, 917, 918, 3, 403, 201, 0, 918, 919, 3, 441, 220, 0, 919, 168, 1, 0, 0, 0, 920, 921, 3, 411, 205, 0, 921, 922, 3, 421, 210, 0, 922, 923, 3, 401, 200, 0, 923, 924, 3, 403, 201, 0, 924, 925, 3, 441, 220, 0, 925, 926, 3, 403, 201, 0, 926, 927, 3, 401, 200, 0, 927, 170, 1, 0, 0, 0, 928, 929, 3, 411, 205, 0, 929, 930, 3, 421, 210, 0, 930, 931, 3, 411, 205, 0, 931, 932, 3, 433, 216, 0, 932, 933, 3, 411, 205, 0, 933, 934, 3, 395, 197, 0, 934, 935, 3, 417, 208, 0, 935, 936, 3, 417, 208, 0, 936, 937, 3, 443, 221, 0, 937, 172, 1, 0, 0, 0, 938, 939, 3, 411, 205, 0, 939, 940, 3, 421, 210, 0, 940, 941, 3, 421, 210, 0, 941, 942, 3, 403, 201, 0, 942, 943, 3, 429, 214, 0, 943, 174, 1, 0, 0, 0, 944, 945, 3, 411, 205, 0, 945, 946, 3, 421, 210, 0, 946, 947, 3, 431, 215, 0, 947, 948, 3, 403, 201, 0, 948, 949, 3, 429, 214, 0, 949, 950, 3, 433, 216, 0, 950, 176, 1, 0, 0, 0, 951, 952, 3, 411, 205, 0, 952, 953, 3, 421, 210, 0, 953, 954, 3, 431, 215, 0, 954, 955, 3, 433, 216, 0, 955, 956, 3, 403, 201, 0, 956, 957, 3, 395, 197, 0, 957, 958, 3, 401, 200, 0, 958, 178, 1, 0, 0, 0, 959, 960, 3, 411, 205, 0, 960, 961, 3, 421, 210, 0, 961, 962, 3, 433, 216, 0, 962, 963, 3, 403, 201, 0, 963, 964, 3, 429, 214, 0, 964, 965, 3, 431, 215, 0, 965, 966, 3, 403, 201, 0, 966, 967, 3, 399, 199, 0, 967, 968, 3, 433, 216, 0, 968, 180, 1, 0, 0, 0, 969, 970, 3, 411, 205, 0, 970, 971, 3, 421, 210, 0, 971, 972, 3, 433, 216, 0, 972, 973, 3, 423, 211, 0, 973, 182, 1, 0, 0, 0, 974, 975, 3, 411, 205, 0, 975, 976, 3, 431, 215, 0, 976, 184, 1, 0, 0, 0, 977, 978, 3, 411, 205, 0, 978, 979, 3, 431, 215, 0, 979, 980, 3, 421, 210, 0, 980, 981, 3, 435, 217, 0, 981, 982, 3, 417, 208, 0, 982, 983, 3, 417, 208, 0, 983, 186, 1, 0, 0, 0, 984, 985, 3, 413, 206, 0, 985, 986, 3, 423, 211, 0, 986, 987, 3, 411, 205, 0, 987, 988, 3, 421, 210, 0, 988, 188, 1, 0, 0, 0, 989, 990, 3, 415, 207, 0, 990, 991, 3, 403, 201, 0, 991, 992, 3, 443, 221, 0, 992, 190, 1, 0, 0, 0, 993, 994, 3, 417, 208, 0, 994, 995, 3, 403, 201, 0, 995, 996, 3, 405, 202, 0, 996, 997, 3, 433, 216, 0, 997, 192, 1, 0, 0, 0, 998, 999, 3, 417, 208, 0, 999, 1000, 3, 411, 205, 0, 1000, 1001, 3, 415, 207, 0, 1001, 1002, 3, 403, 201, 0, 1002, 194, 1, 0, 0, 0, 1003, 1004, 3, 417, 208, 0, 1004, 1005, 3, 411, 205, 0, 1005, 1006, 3, 419, 209, 0, 1006, 1007, 3, 411, 205, 0, 1007, 1008, 3, 433, 216, 0, 1008, 196, 1, 0, 0, 0, 1009, 1010, 3, 419, 209, 0, 1010, 1011, 3, 395, 197, 0, 1011, 1012, 3, 433, 216, 0, 1012, 1013, 3, 399, 199, 0, 1013, 1014, 3, 409, 204, 0, 1014, 198, 1, 0, 0, 0, 1015, 1016, 3, 421, 210, 0, 1016, 1017, 3, 395, 197, 0, 1017, 1018, 3, 433, 216, 0, 1018, 1019, 3, 435, 217, 0, 1019, 1020, 3, 429, 214, 0, 1020, 1021, 3, 395, 197, 0, 1021, 1022, 3, 417, 208, 0, 1022, 200, 1, 0, 0, 0, 1023, 1024, 3, 421, 210, 0, 1024, 1025, 3, 423, 211, 0, 1025, 202, 1, 0, 0, 0, 1026, 1027, 3, 421, 210, 0, 1027, 1028, 3, 423, 211, 0, 1028, 1029, 3, 433, 216, 0, 1029, 204, 1, 0, 0, 0, 1030, 1031, 3, 421, 210, 0, 1031, 1032, 3, 423, 211, 0, 1032, 1033, 3, 433, 216, 0, 1033, 1034, 3, 421, 210, 0, 1034, 1035, 3, 435, 217, 0, 1035, 1036, 3, 417, 208, 0, 1036, 1037, 3, 417, 208, 0, 1037, 206, 1, 0, 0, 0, 1038, 1039, 3, 421, 210, 0, 1039, 1040, 3, 435, 217, 0, 1040, 1041, 3, 417, 208, 0, 1041, 1042, 3, 417, 208, 0, 1042, 208, 1, 0, 0, 0, 1043, 1044, 3, 423, 211, 0, 1044, 1045, 3, 405, 202, 0, 1045, 210, 1, 0, 0, 0, 1046, 1047, 3, 423, 211, 0, 1047, 1048, 3, 405, 202, 0, 1048, 1049, 3, 405, 202, 0, 1049, 1050, 3, 431, 215, 0, 1050, 1051, 3, 403, 201, 0, 1051, 1052, 3, 433, 216, 0, 1052, 212, 1, 0, 0, 0, 1053, 1054, 3, 423, 211, 0, 1054, 1055, 3, 421, 210, 0, 1055, 214, 1, 0, 0, 0, 1056, 1057, 3, 423, 211, 0, 1057, 1058, 3, 429, 214, 0, 1058, 216, 1, 0, 0, 0, 1059, 1060, 3, 423, 211, 0, 1060, 1061, 3, 429, 214, 0, 1061, 1062, 3, 401, 200, 0, 1062, 1063, 3, 403, 201, 0, 1063, 1064, 3, 429, 214, 0, 1064, 218, 1, 0, 0, 0, 1065, 1066, 3, 423, 211, 0, 1066, 1067, 3, 435, 217, 0, 1067, 1068, 3, 433, 216, 0, 1068, 1069, 3, 403, 201, 0, 1069, 1070, 3, 429, 214, 0, 1070, 220, 1, 0, 0, 0, 1071, 1072, 3, 425, 212, 0, 1072, 1073, 3, 417, 208, 0, 1073, 1074, 3, 395, 197, 0, 1074, 1075, 3, 421, 210, 0, 1075, 222, 1, 0, 0, 0, 1076, 1077, 3, 425, 212, 0, 1077, 1078, 3, 429, 214, 0, 1078, 1079, 3, 395, 197, 0, 1079, 1080, 3, 407, 203, 0, 1080, 1081, 3, 419, 209, 0, 1081, 1082, 3, 395, 197, 0, 1082, 224, 1, 0, 0, 0, 1083, 1084, 3, 425, 212, 0, 1084, 1085, 3, 429, 214, 0, 1085, 1086, 3, 411, 205, 0, 1086, 1087, 3, 419, 209, 0, 1087, 1088, 3, 395, 197, 0, 1088, 1089, 3, 429, 214, 0, 1089, 1090, 3, 443, 221, 0, 1090, 226, 1, 0, 0, 0, 1091, 1092, 3, 427, 213, 0, 1092, 1093, 3, 435, 217, 0, 1093, 1094, 3, 403, 201, 0, 1094, 1095, 3, 429, 214, 0, 1095, 1096, 3, 443, 221, 0, 1096, 228, 1, 0, 0, 0, 1097, 1098, 3, 429, 214, 0, 1098, 1099, 3, 395, 197, 0, 1099, 1100, 3, 411, 205, 0, 1100, 1101, 3, 431, 215, 0, 1101, 1102, 3, 403, 201, 0, 1102, 230, 1, 0, 0, 0, 1103, 1104, 3, 429, 214, 0, 1104, 1105, 3, 403, 201, 0, 1105, 1106, 3, 399, 199, 0, 1106, 1107, 3, 435, 217, 0, 1107, 1108, 3, 429, 214, 0, 1108, 1109, 3, 431, 215, 0, 1109, 1110, 3, 411, 205, 0, 1110, 1111, 3, 437, 218, 0, 1111, 1112, 3, 403, 201, 0, 1112, 232, 1, 0, 0, 0, 1113, 1114, 3, 429, 214, 0, 1114, 1115, 3, 403, 201, 0, 1115, 1116, 3, 405, 202, 0, 1116, 1117, 3, 403, 201, 0, 1117, 1118, 3, 429, 214, 0, 1118, 1119, 3, 403, 201, 0, 1119, 1120, 3, 421, 210, 0, 1120, 1121, 3, 399, 199, 0, 1121, 1122, 3, 403, 201, 0, 1122, 1123, 3, 431, 215, 0, 1123, 234, 1, 0, 0, 0, 1124, 1125, 3, 429, 214, 0, 1125, 1126, 3, 403, 201, 0, 1126, 1127, 3, 407, 203, 0, 1127, 1128, 3, 403, 201, 0, 1128, 1129, 3, 441, 220, 0, 1129, 1130, 3, 425, 212, 0, 1130, 236, 1, 0, 0, 0, 1131, 1132, 3, 429, 214, 0, 1132, 1133, 3, 403, 201, 0, 1133, 1134, 3, 411, 205, 0, 1134, 1135, 3, 421, 210, 0, 1135, 1136, 3, 401, 200, 0, 1136, 1137, 3, 403, 201, 0, 1137, 1138, 3, 441, 220, 0, 1138, 238, 1, 0, 0, 0, 1139, 1140, 3, 429, 214, 0, 1140, 1141, 3, 403, 201, 0, 1141, 1142, 3, 417, 208, 0, 1142, 1143, 3, 403, 201, 0, 1143, 1144, 3, 395, 197, 0, 1144, 1145, 3, 431, 215, 0, 1145, 1146, 3, 403, 201, 0, 1146, 240, 1, 0, 0, 0, 1147, 1148, 3, 429, 214, 0, 1148, 1149, 3, 403, 201, 0, 1149, 1150, 3, 421, 210, 0, 1150, 1151, 3, 395, 197, 0, 1151, 1152, 3, 419, 209, 0, 1152, 1153, 3, 403, 201, 0, 1153, 242, 1, 0, 0, 0, 1154, 1155, 3, 429, 214, 0, 1155, 1156, 3, 403, 201, 0, 1156, 1157, 3, 425, 212, 0, 1157, 1158, 3, 417, 208, 0, 1158, 1159, 3, 395, 197, 0, 1159, 1160, 3, 399, 199, 0, 1160, 1161, 3, 403, 201, 0, 1161, 244, 1, 0, 0, 0, 1162, 1163, 3, 429, 214, 0, 1163, 1164, 3, 403, 201, 0, 1164, 1165, 3, 431, 215, 0, 1165, 1166, 3, 433, 216, 0, 1166, 1167, 3, 429, 214, 0, 1167, 1168, 3, 411, 205, 0, 1168, 1169, 3, 399, 199, 0, 1169, 1170, 3, 433, 216, 0, 1170, 246, 1, 0, 0, 0, 1171, 1172, 3, 429, 214, 0, 1172, 1173, 3, 403, 201, 0, 1173, 1174, 3, 433, 216, 0, 1174, 1175, 3, 435, 217, 0, 1175, 1176, 3, 429, 214, 0, 1176, 1177, 3, 421, 210, 0, 1177, 1178, 3, 411, 205, 0, 1178, 1179, 3, 421, 210, 0, 1179, 1180, 3, 407, 203, 0, 1180, 248, 1, 0, 0, 0, 1181, 1182, 3, 429, 214, 0, 1182, 1183, 3, 411, 205, 0, 1183, 1184, 3, 407, 203, 0, 1184, 1185, 3, 409, 204, 0, 1185, 1186, 3, 433, 216, 0, 1186, 250, 1, 0, 0, 0, 1187, 1188, 3, 429, 214, 0, 1188, 1189, 3, 423, 211, 0, 1189, 1190, 3, 417, 208, 0, 1190, 1191, 3, 417, 208, 0, 1191, 1192, 3, 397, 198, 0, 1192, 1193, 3, 395, 197, 0, 1193, 1194, 3, 399, 199, 0, 1194, 1195, 3, 415, 207, 0, 1195, 252, 1, 0, 0, 0, 1196, 1197, 3, 429, 214, 0, 1197, 1198, 3, 423, 211, 0, 1198, 1199, 3, 439, 219, 0, 1199, 254, 1, 0, 0, 0, 1200, 1201, 3, 429, 214, 0, 1201, 1202, 3, 423, 211, 0, 1202, 1203, 3, 439, 219, 0, 1203, 1204, 3, 431, 215, 0, 1204, 256, 1, 0, 0, 0, 1205, 1206, 3, 431, 215, 0, 1206, 1207, 3, 395, 197, 0, 1207, 1208, 3, 437, 218, 0, 1208, 1209, 3, 403, 201, 0, 1209, 1210, 3, 425, 212, 0, 1210, 1211, 3, 423, 211, 0, 1211, 1212, 3, 411, 205, 0, 1212, 1213, 3, 421, 210, 0, 1213, 1214, 3, 433, 216, 0, 1214, 258, 1, 0, 0, 0, 1215, 1216, 3, 431, 215, 0, 1216, 1217, 3, 403, 201, 0, 1217, 1218, 3, 417, 208, 0, 1218, 1219, 3, 403, 201, 0, 1219, 1220, 3, 399, 199, 0, 1220, 1221, 3, 433, 216, 0, 1221, 260, 1, 0, 0, 0, 1222, 1223, 3, 431, 215, 0, 1223, 1224, 3, 403, 201, 0, 1224, 1225, 3, 433, 216, 0, 1225, 262, 1, 0, 0, 0, 1226, 1227, 3, 431, 215, 0, 1227, 1228, 3, 433, 216, 0, 1228, 1229, 3, 429, 214, 0, 1229, 1230, 3, 411, 205, 0, 1230, 1231, 3, 399, 199, 0, 1231, 1232, 3, 433, 216, 0, 1232, 264, 1, 0, 0, 0, 1233, 1234, 3, 433, 216, 0, 1234, 1235, 3, 395, 197, 0, 1235, 1236, 3, 397, 198, 0, 1236, 1237, 3, 417, 208, 0, 1237, 1238, 3, 403, 201, 0, 1238, 266, 1, 0, 0, 0, 1239, 1240, 3, 433, 216, 0, 1240, 1241, 3, 403, 201, 0, 1241, 1242, 3, 419, 209, 0, 1242, 1243, 3, 425, 212, 0, 1243, 268, 1, 0, 0, 0, 1244, 1245, 3, 433, 216, 0, 1245, 1246, 3, 403, 201, 0, 1246, 1247, 3, 419, 209, 0, 1247, 1248, 3, 425, 212, 0, 1248, 1249, 3, 423, 211, 0, 1249, 1250, 3, 429, 214, 0, 1250, 1251, 3, 395, 197, 0, 1251, 1252, 3, 429, 214, 0, 1252, 1253, 3, 443, 221, 0, 1253, 270, 1, 0, 0, 0, 1254, 1255, 3, 433, 216, 0, 1255, 1256, 3, 409, 204, 0, 1256, 1257, 3, 403, 201, 0, 1257, 1258, 3, 421, 210, 0, 1258, 272, 1, 0, 0, 0, 1259, 1260, 3, 433, 216, 0, 1260, 1261, 3, 423, 211, 0, 1261, 274, 1, 0, 0, 0, 1262, 1263, 3, 433, 216, 0, 1263, 1264, 3, 429, 214, 0, 1264, 1265, 3, 395, 197, 0, 1265, 1266, 3, 421, 210, 0, 1266, 1267, 3, 431, 215, 0, 1267, 1268, 3, 395, 197, 0, 1268, 1269, 3, 399, 199, 0, 1269, 1270, 3, 433, 216, 0, 1270, 1271, 3, 411, 205, 0, 1271, 1272, 3, 423, 211, 0, 1272, 1273, 3, 421, 210, 0, 1273, 276, 1, 0, 0, 0, 1274, 1275, 3, 433, 216, 0, 1275, 1276, 3, 429, 214, 0, 1276, 1277, 3, 411, 205, 0, 1277, 1278, 3, 407, 203, 0, 1278, 1279, 3, 407, 203, 0, 1279, 1280, 3, 403, 201, 0, 1280, 1281, 3, 429, 214, 0, 1281, 278, 1, 0, 0, 0, 1282, 1283, 3, 435, 217, 0, 1283, 1284, 3, 421, 210, 0, 1284, 1285, 3, 411, 205, 0, 1285, 1286, 3, 423, 211, 0, 1286, 1287, 3, 421, 210, 0, 1287, 280, 1, 0, 0, 0, 1288, 1289, 3, 435, 217, 0, 1289, 1290, 3, 421, 210, 0, 1290, 1291, 3, 411, 205, 0, 1291, 1292, 3, 427, 213, 0, 1292, 1293, 3, 435, 217, 0, 1293, 1294, 3, 403, 201, 0, 1294, 282, 1, 0, 0, 0, 1295, 1296, 3, 435, 217, 0, 1296, 1297, 3, 425, 212, 0, 1297, 1298, 3, 401, 200, 0, 1298, 1299, 3, 395, 197, 0, 1299, 1300, 3, 433, 216, 0, 1300, 1301, 3, 403, 201, 0, 1301, 284, 1, 0, 0, 0, 1302, 1303, 3, 435, 217, 0, 1303, 1304, 3, 431, 215, 0, 1304, 1305, 3, 411, 205, 0, 1305, 1306, 3, 421, 210, 0, 1306, 1307, 3, 407, 203, 0, 1307, 286, 1, 0, 0, 0, 1308, 1309, 3, 437, 218, 0, 1309, 1310, 3, 395, 197, 0, 1310, 1311, 3, 399, 199, 0, 1311, 1312, 3, 435, 217, 0, 1312, 1313, 3, 435, 217, 0, 1313, 1314, 3, 419, 209, 0, 1314, 288, 1, 0, 0, 0, 1315, 1316, 3, 437, 218, 0, 1316, 1317, 3, 395, 197, 0, 1317, 1318, 3, 417, 208, 0, 1318, 1319, 3, 435, 217, 0, 1319, 1320, 3, 403, 201, 0, 1320, 1321, 3, 431, 215, 0, 1321, 290, 1, 0, 0, 0, 1322, 1323, 3, 437, 218, 0, 1323, 1324, 3, 411, 205, 0, 1324, 1325, 3, 403, 201, 0, 1325, 1326, 3, 439, 219, 0, 1326, 292, 1, 0, 0, 0, 1327, 1328, 3, 437, 218, 0, 1328, 1329, 3, 411, 205, 0, 1329, 1330, 3, 429, 214, 0, 1330, 1331, 3, 433, 216, 0, 1331, 1332, 3, 435, 217, 0, 1332, 1333, 3, 395, 197, 0, 1333, 1334, 3, 417, 208, 0, 1334, 294, 1, 0, 0, 0, 1335, 1336, 3, 439, 219, 0, 1336, 1337, 3, 409, 204, 0, 1337, 1338, 3, 403, 201, 0, 1338, 1339, 3, 421, 210, 0, 1339, 296, 1, 0, 0, 0, 1340, 1341, 3, 439, 219, 0, 1341, 1342, 3, 409, 204, 0, 1342, 1343, 3, 403, 201, 0, 1343, 1344, 3, 429, 214, 0, 1344, 1345, 3, 403, 201, 0, 1345, 298, 1, 0, 0, 0, 1346, 1347, 3, 439, 219, 0, 1347, 1348, 3, 411, 205, 0, 1348, 1349, 3, 433, 216, 0, 1349, 1350, 3, 409, 204, 0, 1350, 300, 1, 0, 0, 0, 1351, 1352, 3, 439, 219, 0, 1352, 1353, 3, 411, 205, 0, 1353, 1354, 3, 433, 216, 0, 1354, 1355, 3, 409, 204, 0, 1355, 1356, 3, 423, 211, 0, 1356, 1357, 3, 435, 217, 0, 1357, 1358, 3, 433, 216, 0, 1358, 302, 1, 0, 0, 0, 1359, 1360, 3, 405, 202, 0, 1360, 1361, 3, 411, 205, 0, 1361, 1362, 3, 429, 214, 0, 1362, 1363, 3, 431, 215, 0, 1363, 1364, 3, 433, 216, 0, 1364, 1365, 5, 95, 0, 0, 1365, 1366, 3, 437, 218, 0, 1366, 1367, 3, 395, 197, 0, 1367, 1368, 3, 417, 208, 0, 1368, 1369, 3, 435, 217, 0, 1369, 1370, 3, 403, 201, 0, 1370, 304, 1, 0, 0, 0, 1371, 1372, 3, 423, 211, 0, 1372, 1373, 3, 437, 218, 0, 1373, 1374, 3, 403, 201, 0, 1374, 1375, 3, 429, 214, 0, 1375, 306, 1, 0, 0, 0, 1376, 1377, 3, 425, 212, 0, 1377, 1378, 3, 395, 197, 0, 1378, 1379, 3, 429, 214, 0, 1379, 1380, 3, 433, 216, 0, 1380, 1381, 3, 411, 205, 0, 1381, 1382, 3, 433, 216, 0, 1382, 1383, 3, 411, 205, 0, 1383, 1384, 3, 423, 211, 0, 1384, 1385, 3, 421, 210, 0, 1385, 308, 1, 0, 0, 0, 1386, 1387, 3, 429, 214, 0, 1387, 1388, 3, 395, 197, 0, 1388, 1389, 3, 421, 210, 0, 1389, 1390, 3, 407, 203, 0, 1390, 1391, 3, 403, 201, 0, 1391, 310, 1, 0, 0, 0, 1392, 1393, 3, 425, 212, 0, 1393, 1394, 3, 429, 214, 0, 1394, 1395, 3, 403, 201, 0, 1395, 1396, 3, 399, 199, 0, 1396, 1397, 3, 403, 201, 0, 1397, 1398, 3, 401, 200, 0, 1398, 1399, 3, 411, 205, 0, 1399, 1400, 3, 421, 210, 0, 1400, 1401, 3, 407, 203, 0, 1401, 312, 1, 0, 0, 0, 1402, 1403, 3, 435, 217, 0, 1403, 1404, 3, 421, 210, 0, 1404, 1405, 3, 397, 198, 0, 1405, 1406, 3, 423, 211, 0, 1406, 1407, 3, 435, 217, 0, 1407, 1408, 3, 421, 210, 0, 1408, 1409, 3, 401, 200, 0, 1409, 1410, 3, 403, 201, 0, 1410, 1411, 3, 401, 200, 0, 1411, 314, 1, 0, 0, 0, 1412, 1413, 3, 399, 199, 0, 1413, 1414, 3, 435, 217, 0, 1414, 1415, 3, 429, 214, 0, 1415, 1416, 3, 429, 214, 0, 1416, 1417, 3, 403, 201, 0, 1417, 1418, 3, 421, 210, 0, 1418, 1419, 3, 433, 216, 0, 1419, 316, 1, 0, 0, 0, 1420, 1421, 3, 405, 202, 0, 1421, 1422, 3, 423, 211, 0, 1422, 1423, 3, 417, 208, 0, 1423, 1424, 3, 417, 208, 0, 1424, 1425, 3, 423, 211, 0, 1425, 1426, 3, 439, 219, 0, 1426, 1427, 3, 411, 205, 0, 1427, 1428, 3, 421, 210, 0, 1428, 1429, 3, 407, 203, 0, 1429, 318, 1, 0, 0, 0, 1430, 1431, 3, 399, 199, 0, 1431, 1432, 3, 435, 217, 0, 1432, 1433, 3, 419, 209, 0, 1433, 1434, 3, 403, 201, 0, 1434, 1435, 5, 95, 0, 0, 1435, 1436, 3, 401, 200, 0, 1436, 1437, 3, 411, 205, 0, 1437, 1438, 3, 431, 215, 0, 1438, 1439, 3, 433, 216, 0, 1439, 320, 1, 0, 0, 0, 1440, 1441, 3, 401, 200, 0, 1441, 1442, 3, 403, 201, 0, 1442, 1443, 3, 421, 210, 0, 1443, 1444, 3, 431, 215, 0, 1444, 1445, 3, 403, 201, 0, 1445, 1446, 5, 95, 0, 0, 1446, 1447, 3, 429, 214, 0, 1447, 1448, 3, 395, 197, 0, 1448, 1449, 3, 421, 210, 0, 1449, 1450, 3, 415, 207, 0, 1450, 322, 1, 0, 0, 0, 1451, 1452, 3, 417, 208, 0, 1452, 1453, 3, 395, 197, 0, 1453, 1454, 3, 407, 203, 0, 1454, 324, 1, 0, 0, 0, 1455, 1456, 3, 417, 208, 0, 1456, 1457, 3, 395, 197, 0, 1457, 1458, 3, 431, 215, 0, 1458, 1459, 3, 433, 216, 0, 1459, 1460, 5, 95, 0, 0, 1460, 1461, 3, 437, 218, 0, 1461, 1462, 3, 395, 197, 0, 1462, 1463, 3, 417, 208, 0, 1463, 1464, 3, 435, 217, 0, 1464, 1465, 3, 403, 201, 0, 1465, 326, 1, 0, 0, 0, 1466, 1467, 3, 417, 208, 0, 1467, 1468, 3, 403, 201, 0, 1468, 1469, 3, 395, 197, 0, 1469, 1470, 3, 401, 200, 0, 1470, 328, 1, 0, 0, 0, 1471, 1472, 3, 421, 210, 0, 1472, 1473, 3, 433, 216, 0, 1473, 1474, 3, 409, 204, 0, 1474, 1475, 5, 95, 0, 0, 1475, 1476, 3, 437, 218, 0, 1476, 1477, 3, 395, 197, 0, 1477, 1478, 3, 417, 208, 0, 1478, 1479, 3, 435, 217, 0, 1479, 1480, 3, 403, 201, 0, 1480, 330, 1, 0, 0, 0, 1481, 1482, 3, 421, 210, 0, 1482, 1483, 3, 433, 216, 0, 1483, 1484, 3, 411, 205, 0, 1484, 1485, 3, 417, 208, 0, 1485, 1486, 3, 403, 201, 0, 1486, 332, 1, 0, 0, 0, 1487, 1488, 3, 425, 212, 0, 1488, 1489, 3, 403, 201, 0, 1489, 1490, 3, 429, 214, 0, 1490, 1491, 3, 399, 199, 0, 1491, 1492, 3, 403, 201, 0, 1492, 1493, 3, 421, 210, 0, 1493, 1494, 3, 433, 216, 0, 1494, 1495, 5, 95, 0, 0, 1495, 1496, 3, 429, 214, 0, 1496, 1497, 3, 395, 197, 0, 1497, 1498, 3, 421, 210, 0, 1498, 1499, 3, 415, 207, 0, 1499, 334, 1, 0, 0, 0, 1500, 1501, 3, 429, 214, 0, 1501, 1502, 3, 395, 197, 0, 1502, 1503, 3, 421, 210, 0, 1503, 1504, 3, 415, 207, 0, 1504, 336, 1, 0, 0, 0, 1505, 1506, 3, 429, 214, 0, 1506, 1507, 3, 423, 211, 0, 1507, 1508, 3, 439, 219, 0, 1508, 1509, 5, 95, 0, 0, 1509, 1510, 3, 421, 210, 0, 1510, 1511, 3, 435, 217, 0, 1511, 1512, 3, 419, 209, 0, 1512, 1513, 3, 397, 198, 0, 1513, 1514, 3, 403, 201, 0, 1514, 1515, 3, 429, 214, 0, 1515, 338, 1, 0, 0, 0, 1516, 1517, 3, 407, 203, 0, 1517, 1518, 3, 403, 201, 0, 1518, 1519, 3, 421, 210, 0, 1519, 1520, 3, 403, 201, 0, 1520, 1521, 3, 429, 214, 0, 1521, 1522, 3, 395, 197, 0, 1522, 1523, 3, 433, 216, 0, 1523, 1524, 3, 403, 201, 0, 1524, 1525, 3, 401, 200, 0, 1525, 340, 1, 0, 0, 0, 1526, 1527, 3, 395, 197, 0, 1527, 1528, 3, 417, 208, 0, 1528, 1529, 3, 439, 219, 0, 1529, 1530, 3, 395, 197, 0, 1530, 1531, 3, 443, 221, 0, 1531, 1532, 3, 431, 215, 0, 1532, 342, 1, 0, 0, 0, 1533, 1534, 3, 431, 215, 0, 1534, 1535, 3, 433, 216, 0, 1535, 1536, 3, 423, 211, 0, 1536, 1537, 3, 429, 214, 0, 1537, 1538, 3, 403, 201, 0, 1538, 1539, 3, 401, 200, 0, 1539, 344, 1, 0, 0, 0, 1540, 1541, 3, 433, 216, 0, 1541, 1542, 3, 429, 214, 0, 1542, 1543, 3, 435, 217, 0, 1543, 1544, 3, 403, 201, 0, 1544, 346, 1, 0, 0, 0, 1545, 1546, 3, 405, 202, 0, 1546, 1547, 3, 395, 197, 0, 1547, 1548, 3, 417, 208, 0, 1548, 1549, 3, 431, 215, 0, 1549, 1550, 3, 403, 201, 0, 1550, 348, 1, 0, 0, 0, 1551, 1552, 3, 439, 219, 0, 1552, 1553, 3, 411, 205, 0, 1553, 1554, 3, 421, 210, 0, 1554, 1555, 3, 401, 200, 0, 1555, 1556, 3, 423, 211, 0, 1556, 1557, 3, 439, 219, 0, 1557, 350, 1, 0, 0, 0, 1558, 1559, 3, 421, 210, 0, 1559, 1560, 3, 435, 217, 0, 1560, 1561, 3, 417, 208, 0, 1561, 1562, 3, 417, 208, 0, 1562, 1563, 3, 431, 215, 0, 1563, 352, 1, 0, 0, 0, 1564, 1565, 3, 405, 202, 0, 1565, 1566, 3, 411, 205, 0, 1566, 1567, 3, 429, 214, 0, 1567, 1568, 3, 431, 215, 0, 1568, 1569, 3, 433, 216, 0, 1569, 354, 1, 0, 0, 0, 1570, 1571, 3, 417, 208, 0, 1571, 1572, 3, 395, 197, 0, 1572, 1573, 3, 431, 215, 0, 1573, 1574, 3, 433, 216, 0, 1574, 356, 1, 0, 0, 0, 1575, 1576, 3, 405, 202, 0, 1576, 1577, 3, 411, 205, 0, 1577, 1578, 3, 417, 208, 0, 1578, 1579, 3, 433, 216, 0, 1579, 1580, 3, 403, 201, 0, 1580, 1581, 3, 429, 214, 0, 1581, 358, 1, 0, 0, 0, 1582, 1583, 3, 407, 203, 0, 1583, 1584, 3, 429, 214, 0, 1584, 1585, 3, 423, 211, 0, 1585, 1586, 3, 435, 217, 0, 1586, 1587, 3, 425, 212, 0, 1587, 1588, 3, 431, 215, 0, 1588, 360, 1, 0, 0, 0, 1589, 1590, 3, 403, 201, 0, 1590, 1591, 3, 441, 220, 0, 1591, 1592, 3, 399, 199, 0, 1592, 1593, 3, 417, 208, 0, 1593, 1594, 3, 435, 217, 0, 1594, 1595, 3, 401, 200, 0, 1595, 1596, 3, 403, 201, 0, 1596, 362, 1, 0, 0, 0, 1597, 1598, 3, 433, 216, 0, 1598, 1599, 3, 411, 205, 0, 1599, 1600, 3, 403, 201, 0, 1600, 1601, 3, 431, 215, 0, 1601, 364, 1, 0, 0, 0, 1602, 1603, 3, 423, 211, 0, 1603, 1604, 3, 433, 216, 0, 1604, 1605, 3, 409, 204, 0, 1605, 1606, 3, 403, 201, 0, 1606, 1607, 3, 429, 214, 0, 1607, 1608, 3, 431, 215, 0, 1608, 366, 1, 0, 0, 0, 1609, 1610, 3, 401, 200, 0, 1610, 1611, 3, 423, 211, 0, 1611, 368, 1, 0, 0, 0, 1612, 1613, 3, 421, 210, 0, 1613, 1614, 3, 423, 211, 0, 1614, 1615, 3, 433, 216, 0, 1615, 1616, 3, 409, 204, 0, 1616, 1617, 3, 411, 205, 0, 1617, 1618, 3, 421, 210, 0, 1618, 1619, 3, 407, 203, 0, 1619, 370, 1, 0, 0, 0, 1620, 1626, 5, 34, 0, 0, 1621, 1625, 8, 0, 0, 0, 1622, 1623, 5, 34, 0, 0, 1623, 1625, 5, 34, 0, 0, 1624, 1621, 1, 0, 0, 0, 1624, 1622, 1, 0, 0, 0, 1625, 1628, 1, 0, 0, 0, 1626, 1624, 1, 0, 0, 0, 1626, 1627, 1, 0, 0, 0, 1627, 1629, 1, 0, 0, 0, 1628, 1626, 1, 0, 0, 0, 1629, 1656, 5, 34, 0, 0, 1630, 1636, 5, 96, 0, 0, 1631, 1635, 8, 1, 0, 0, 1632, 1633, 5, 96, 0, 0, 1633, 1635, 5, 96, 0, 0, 1634, 1631, 1, 0, 0, 0, 1634, 1632, 1, 0, 0, 0, 1635, 1638, 1, 0, 0, 0, 1636, 1634, 1, 0, 0, 0, 1636, 1637, 1, 0, 0, 0, 1637, 1639, 1, 0, 0, 0, 1638, 1636, 1, 0, 0, 0, 1639, 1656, 5, 96, 0, 0, 1640, 1644, 5, 91, 0, 0, 1641, 1643, 8, 2, 0, 0, 1642, 1641, 1, 0, 0, 0, 1643, 1646, 1, 0, 0, 0, 1644, 1642, 1, 0, 0, 0, 1644, 1645, 1, 0, 0, 0, 1645, 1647, 1, 0, 0, 0, 1646, 1644, 1, 0, 0, 0, 1647, 1656, 5, 93, 0, 0, 1648, 1652, 7, 3, 0, 0, 1649, 1651, 7, 4, 0, 0, 1650, 1649, 1, 0, 0, 0, 1651, 1654, 1, 0, 0, 0, 1652, 1650, 1, 0, 0, 0, 1652, 1653, 1, 0, 0, 0, 1653, 1656, 1, 0, 0, 0, 1654, 1652, 1, 0, 0, 0, 1655, 1620, 1, 0, 0, 0, 1655, 1630, 1, 0, 0, 0, 1655, 1640, 1, 0, 0, 0, 1655, 1648, 1, 0, 0, 0, 1656, 372, 1, 0, 0, 0, 1657, 1659, 3, 393, 196, 0, 1658, 1657, 1, 0, 0, 0, 1659, 1660, 1, 0, 0, 0, 1660, 1658, 1, 0, 0, 0, 1660, 1661, 1, 0, 0, 0, 1661, 1669, 1, 0, 0, 0, 1662, 1666, 5, 46, 0, 0, 1663, 1665, 3, 393, 196, 0, 1664, 1663, 1, 0, 0, 0, 1665, 1668, 1, 0, 0, 0, 1666, 1664, 1, 0, 0, 0, 1666, 1667, 1, 0, 0, 0, 1667, 1670, 1, 0, 0, 0, 1668, 1666, 1, 0, 0, 0, 1669, 1662, 1, 0, 0, 0, 1669, 1670, 1, 0, 0, 0, 1670, 1678, 1, 0, 0, 0, 1671, 1673, 5, 46, 0, 0, 1672, 1674, 3, 393, 196, 0, 1673, 1672, 1, 0, 0, 0, 1674, 1675, 1, 0, 0, 0, 1675, 1673, 1, 0, 0, 0, 1675, 1676, 1, 0, 0, 0, 1676, 1678, 1, 0, 0, 0, 1677, 1658, 1, 0, 0, 0, 1677, 1671, 1, 0, 0, 0, 1678, 1688, 1, 0, 0, 0, 1679, 1681, 3, 403, 201, 0, 1680, 1682, 7, 5, 0, 0, 1681, 1680, 1, 0, 0, 0, 1681, 1682, 1, 0, 0, 0, 1682, 1684, 1, 0, 0, 0, 1683, 1685, 3, 393, 196, 0, 1684, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1689, 1, 0, 0, 0, 1688, 1679, 1, 0, 0, 0, 1688, 1689, 1, 0, 0, 0, 1689, 1699, 1, 0, 0, 0, 1690, 1691, 5, 48, 0, 0, 1691, 1692, 5, 120, 0, 0, 1692, 1694, 1, 0, 0, 0, 1693, 1695, 3, 391, 195, 0, 1694, 1693, 1, 0, 0, 0, 1695, 1696, 1, 0, 0, 0, 1696, 1694, 1, 0, 0, 0, 1696, 1697, 1, 0, 0, 0, 1697, 1699, 1, 0, 0, 0, 1698, 1677, 1, 0, 0, 0, 1698, 1690, 1, 0, 0, 0, 1699, 374, 1, 0, 0, 0, 1700, 1704, 5, 63, 0, 0, 1701, 1703, 3, 393, 196, 0, 1702, 1701, 1, 0, 0, 0, 1703, 1706, 1, 0, 0, 0, 1704, 1702, 1, 0, 0, 0, 1704, 1705, 1, 0, 0, 0, 1705, 376, 1, 0, 0, 0, 1706, 1704, 1, 0, 0, 0, 1707, 1708, 7, 6, 0, 0, 1708, 1709, 3, 371, 185, 0, 1709, 378, 1, 0, 0, 0, 1710, 1716, 5, 39, 0, 0, 1711, 1715, 8, 7, 0, 0, 1712, 1713, 5, 39, 0, 0, 1713, 1715, 5, 39, 0, 0, 1714, 1711, 1, 0, 0, 0, 1714, 1712, 1, 0, 0, 0, 1715, 1718, 1, 0, 0, 0, 1716, 1714, 1, 0, 0, 0, 1716, 1717, 1, 0, 0, 0, 1717, 1719, 1, 0, 0, 0, 1718, 1716, 1, 0, 0, 0, 1719, 1720, 5, 39, 0, 0, 1720, 380, 1, 0, 0, 0, 1721, 1722, 3, 441, 220, 0, 1722, 1723, 3, 379, 189, 0, 1723, 382, 1, 0, 0, 0, 1724, 1725, 5, 45, 0, 0, 1725, 1726, 5, 45, 0, 0, 1726, 1730, 1, 0, 0, 0, 1727, 1729, 8, 8, 0, 0, 1728, 1727, 1, 0, 0, 0, 1729, 1732, 1, 0, 0, 0, 1730, 1728, 1, 0, 0, 0, 1730, 1731, 1, 0, 0, 0, 1731, 1738, 1, 0, 0, 0, 1732, 1730, 1, 0, 0, 0, 1733, 1735, 5, 13, 0, 0, 1734, 1733, 1, 0, 0, 0, 1734, 1735, 1, 0, 0, 0, 1735, 1736, 1, 0, 0, 0, 1736, 1739, 5, 10, 0, 0, 1737, 1739, 5, 0, 0, 1, 1738, 1734, 1, 0, 0, 0, 1738, 1737, 1, 0, 0, 0, 1739, 1740, 1, 0, 0, 0, 1740, 1741, 6, 191, 0, 0, 1741, 384, 1, 0, 0, 0, 1742, 1743, 5, 47, 0, 0, 1743, 1744, 5, 42, 0, 0, 1744, 1748, 1, 0, 0, 0, 1745, 1747, 9, 0, 0, 0, 1746, 1745, 1, 0, 0, 0, 1747, 1750, 1, 0, 0, 0, 1748, 1749, 1, 0, 0, 0, 1748, 1746, 1, 0, 0, 0, 1749, 1751, 1, 0, 0, 0, 1750, 1748, 1, 0, 0, 0, 1751, 1752, 5, 42, 0, 0, 1752, 1753, 5, 47, 0, 0, 1753, 1754, 1, 0, 0, 0, 1754, 1755, 6, 192, 0, 0, 1755, 386, 1, 0, 0, 0, 1756, 1757, 7, 9, 0, 0, 1757, 1758, 1, 0, 0, 0, 1758, 1759, 6, 193, 0, 0, 1759, 388, 1, 0, 0, 0, 1760, 1761, 9, 0, 0, 0, 1761, 390, 1, 0, 0, 0, 1762, 1763, 7, 10, 0, 0, 1763, 392, 1, 0, 0, 0, 1764, 1765, 7, 11, 0, 0, 1765, 394, 1, 0, 0, 0, 1766, 1767, 7, 12, 0, 0, 1767, 396, 1, 0, 0, 0, 1768, 1769, 7, 13, 0, 0, 1769, 398, 1, 0, 0, 0, 1770, 1771, 7, 14, 0, 0, 1771, 400, 1, 0, 0, 0, 1772, 1773, 7, 15, 0, 0, 1773, 402, 1, 0, 0, 0, 1774, 1775, 7, 16, 0, 0, 1775, 404, 1, 0, 0, 0, 1776, 1777, 7, 17, 0, 0, 1777, 406, 1, 0, 0, 0, 1778, 1779, 7, 18, 0, 0, 1779, 408, 1, 0, 0, 0, 1780, 1781, 7, 19, 0, 0, 1781, 410, 1, 0, 0, 0, 1782, 1783, 7, 20, 0, 0, 1783, 412, 1, 0, 0, 0, 1784, 1785, 7, 21, 0, 0, 1785, 414, 1, 0, 0, 0, 1786, 1787, 7, 22, 0, 0, 1787, 416, 1, 0, 0, 0, 1788, 1789, 7, 23, 0, 0, 1789, 418, 1, 0, 0, 0, 1790, 1791, 7, 24, 0, 0, 1791, 420, 1, 0, 0, 0, 1792, 1793, 7, 25, 0, 0, 1793, 422, 1, 0, 0, 0, 1794, 1795, 7, 26, 0, 0, 1795, 424, 1, 0, 0, 0, 1796, 1797, 7, 27, 0, 0, 1797, 426, 1, 0, 0, 0, 1798, 1799, 7, 28, 0, 0, 1799, 428, 1, 0, 0, 0, 1800, 1801, 7, 29, 0, 0, 1801, 430, 1, 0, 0, 0, 1802, 1803, 7, 30, 0, 0, 1803, 432, 1, 0, 0, 0, 1804, 1805, 7, 31, 0, 0, 1805, 434, 1, 0, 0, 0, 1806, 1807, 7, 32, 0, 0, 1807, 436, 1, 0, 0, 0, 1808, 1809, 7, 33, 0, 0, 1809, 438, 1, 0, 0, 0, 1810, 1811, 7, 34, 0, 0, 1811, 440, 1, 0, 0, 0, 1812, 1813, 7, 35, 0, 0, 1813, 442, 1, 0, 0, 0, 1814, 1815, 7, 36, 0, 0, 1815, 444, 1, 0, 0, 0, 1816, 1817, 7, 37, 0, 0, 1817, 446, 1, 0, 0, 0, 25, 0, 1624, 1626, 1634, 1636, 1644, 1652, 1655, 1660, 1666, 1669, 1675, 1677, 1681, 1686, 1688, 1696, 1698, 1704, 1714, 1716, 1730, 1734, 1738, 1748, 1, 0, 1, 0] \ No newline at end of file +[4, 0, 197, 1829, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1636, 8, 187, 10, 187, 12, 187, 1639, 9, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1646, 8, 187, 10, 187, 12, 187, 1649, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1654, 8, 187, 10, 187, 12, 187, 1657, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1662, 8, 187, 10, 187, 12, 187, 1665, 9, 187, 3, 187, 1667, 8, 187, 1, 188, 4, 188, 1670, 8, 188, 11, 188, 12, 188, 1671, 1, 188, 1, 188, 5, 188, 1676, 8, 188, 10, 188, 12, 188, 1679, 9, 188, 3, 188, 1681, 8, 188, 1, 188, 1, 188, 4, 188, 1685, 8, 188, 11, 188, 12, 188, 1686, 3, 188, 1689, 8, 188, 1, 188, 1, 188, 3, 188, 1693, 8, 188, 1, 188, 4, 188, 1696, 8, 188, 11, 188, 12, 188, 1697, 3, 188, 1700, 8, 188, 1, 188, 1, 188, 1, 188, 1, 188, 4, 188, 1706, 8, 188, 11, 188, 12, 188, 1707, 3, 188, 1710, 8, 188, 1, 189, 1, 189, 5, 189, 1714, 8, 189, 10, 189, 12, 189, 1717, 9, 189, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 5, 191, 1726, 8, 191, 10, 191, 12, 191, 1729, 9, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 5, 193, 1740, 8, 193, 10, 193, 12, 193, 1743, 9, 193, 1, 193, 3, 193, 1746, 8, 193, 1, 193, 1, 193, 3, 193, 1750, 8, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, 194, 1, 194, 5, 194, 1758, 8, 194, 10, 194, 12, 194, 1761, 9, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 196, 1, 196, 1, 197, 1, 197, 1, 198, 1, 198, 1, 199, 1, 199, 1, 200, 1, 200, 1, 201, 1, 201, 1, 202, 1, 202, 1, 203, 1, 203, 1, 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 1, 207, 1, 207, 1, 208, 1, 208, 1, 209, 1, 209, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, 213, 1, 213, 1, 214, 1, 214, 1, 215, 1, 215, 1, 216, 1, 216, 1, 217, 1, 217, 1, 218, 1, 218, 1, 219, 1, 219, 1, 220, 1, 220, 1, 221, 1, 221, 1, 222, 1, 222, 1, 223, 1, 223, 1, 224, 1, 224, 1, 1759, 0, 225, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 196, 393, 197, 395, 0, 397, 0, 399, 0, 401, 0, 403, 0, 405, 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, 0, 417, 0, 419, 0, 421, 0, 423, 0, 425, 0, 427, 0, 429, 0, 431, 0, 433, 0, 435, 0, 437, 0, 439, 0, 441, 0, 443, 0, 445, 0, 447, 0, 449, 0, 1, 0, 38, 1, 0, 34, 34, 1, 0, 96, 96, 1, 0, 93, 93, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 43, 43, 45, 45, 3, 0, 36, 36, 58, 58, 64, 64, 1, 0, 39, 39, 2, 0, 10, 10, 13, 13, 3, 0, 9, 11, 13, 13, 32, 32, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 57, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 1826, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 1, 451, 1, 0, 0, 0, 3, 453, 1, 0, 0, 0, 5, 455, 1, 0, 0, 0, 7, 457, 1, 0, 0, 0, 9, 459, 1, 0, 0, 0, 11, 461, 1, 0, 0, 0, 13, 463, 1, 0, 0, 0, 15, 465, 1, 0, 0, 0, 17, 467, 1, 0, 0, 0, 19, 471, 1, 0, 0, 0, 21, 474, 1, 0, 0, 0, 23, 476, 1, 0, 0, 0, 25, 478, 1, 0, 0, 0, 27, 481, 1, 0, 0, 0, 29, 483, 1, 0, 0, 0, 31, 485, 1, 0, 0, 0, 33, 488, 1, 0, 0, 0, 35, 491, 1, 0, 0, 0, 37, 493, 1, 0, 0, 0, 39, 495, 1, 0, 0, 0, 41, 497, 1, 0, 0, 0, 43, 500, 1, 0, 0, 0, 45, 502, 1, 0, 0, 0, 47, 505, 1, 0, 0, 0, 49, 508, 1, 0, 0, 0, 51, 511, 1, 0, 0, 0, 53, 514, 1, 0, 0, 0, 55, 520, 1, 0, 0, 0, 57, 527, 1, 0, 0, 0, 59, 531, 1, 0, 0, 0, 61, 537, 1, 0, 0, 0, 63, 541, 1, 0, 0, 0, 65, 547, 1, 0, 0, 0, 67, 555, 1, 0, 0, 0, 69, 559, 1, 0, 0, 0, 71, 562, 1, 0, 0, 0, 73, 566, 1, 0, 0, 0, 75, 573, 1, 0, 0, 0, 77, 587, 1, 0, 0, 0, 79, 594, 1, 0, 0, 0, 81, 600, 1, 0, 0, 0, 83, 608, 1, 0, 0, 0, 85, 611, 1, 0, 0, 0, 87, 619, 1, 0, 0, 0, 89, 624, 1, 0, 0, 0, 91, 629, 1, 0, 0, 0, 93, 635, 1, 0, 0, 0, 95, 643, 1, 0, 0, 0, 97, 650, 1, 0, 0, 0, 99, 657, 1, 0, 0, 0, 101, 666, 1, 0, 0, 0, 103, 677, 1, 0, 0, 0, 105, 684, 1, 0, 0, 0, 107, 690, 1, 0, 0, 0, 109, 703, 1, 0, 0, 0, 111, 716, 1, 0, 0, 0, 113, 734, 1, 0, 0, 0, 115, 743, 1, 0, 0, 0, 117, 751, 1, 0, 0, 0, 119, 762, 1, 0, 0, 0, 121, 771, 1, 0, 0, 0, 123, 778, 1, 0, 0, 0, 125, 783, 1, 0, 0, 0, 127, 790, 1, 0, 0, 0, 129, 799, 1, 0, 0, 0, 131, 804, 1, 0, 0, 0, 133, 809, 1, 0, 0, 0, 135, 814, 1, 0, 0, 0, 137, 818, 1, 0, 0, 0, 139, 825, 1, 0, 0, 0, 141, 832, 1, 0, 0, 0, 143, 842, 1, 0, 0, 0, 145, 849, 1, 0, 0, 0, 147, 857, 1, 0, 0, 0, 149, 862, 1, 0, 0, 0, 151, 866, 1, 0, 0, 0, 153, 874, 1, 0, 0, 0, 155, 879, 1, 0, 0, 0, 157, 884, 1, 0, 0, 0, 159, 889, 1, 0, 0, 0, 161, 895, 1, 0, 0, 0, 163, 902, 1, 0, 0, 0, 165, 905, 1, 0, 0, 0, 167, 912, 1, 0, 0, 0, 169, 922, 1, 0, 0, 0, 171, 925, 1, 0, 0, 0, 173, 931, 1, 0, 0, 0, 175, 939, 1, 0, 0, 0, 177, 949, 1, 0, 0, 0, 179, 955, 1, 0, 0, 0, 181, 962, 1, 0, 0, 0, 183, 970, 1, 0, 0, 0, 185, 980, 1, 0, 0, 0, 187, 985, 1, 0, 0, 0, 189, 988, 1, 0, 0, 0, 191, 995, 1, 0, 0, 0, 193, 1000, 1, 0, 0, 0, 195, 1004, 1, 0, 0, 0, 197, 1009, 1, 0, 0, 0, 199, 1014, 1, 0, 0, 0, 201, 1020, 1, 0, 0, 0, 203, 1026, 1, 0, 0, 0, 205, 1034, 1, 0, 0, 0, 207, 1037, 1, 0, 0, 0, 209, 1041, 1, 0, 0, 0, 211, 1049, 1, 0, 0, 0, 213, 1054, 1, 0, 0, 0, 215, 1057, 1, 0, 0, 0, 217, 1064, 1, 0, 0, 0, 219, 1067, 1, 0, 0, 0, 221, 1070, 1, 0, 0, 0, 223, 1076, 1, 0, 0, 0, 225, 1082, 1, 0, 0, 0, 227, 1087, 1, 0, 0, 0, 229, 1094, 1, 0, 0, 0, 231, 1102, 1, 0, 0, 0, 233, 1108, 1, 0, 0, 0, 235, 1114, 1, 0, 0, 0, 237, 1124, 1, 0, 0, 0, 239, 1135, 1, 0, 0, 0, 241, 1142, 1, 0, 0, 0, 243, 1150, 1, 0, 0, 0, 245, 1158, 1, 0, 0, 0, 247, 1165, 1, 0, 0, 0, 249, 1173, 1, 0, 0, 0, 251, 1182, 1, 0, 0, 0, 253, 1192, 1, 0, 0, 0, 255, 1198, 1, 0, 0, 0, 257, 1207, 1, 0, 0, 0, 259, 1211, 1, 0, 0, 0, 261, 1216, 1, 0, 0, 0, 263, 1226, 1, 0, 0, 0, 265, 1233, 1, 0, 0, 0, 267, 1237, 1, 0, 0, 0, 269, 1244, 1, 0, 0, 0, 271, 1250, 1, 0, 0, 0, 273, 1255, 1, 0, 0, 0, 275, 1265, 1, 0, 0, 0, 277, 1270, 1, 0, 0, 0, 279, 1273, 1, 0, 0, 0, 281, 1285, 1, 0, 0, 0, 283, 1293, 1, 0, 0, 0, 285, 1299, 1, 0, 0, 0, 287, 1306, 1, 0, 0, 0, 289, 1313, 1, 0, 0, 0, 291, 1319, 1, 0, 0, 0, 293, 1326, 1, 0, 0, 0, 295, 1333, 1, 0, 0, 0, 297, 1338, 1, 0, 0, 0, 299, 1346, 1, 0, 0, 0, 301, 1351, 1, 0, 0, 0, 303, 1357, 1, 0, 0, 0, 305, 1362, 1, 0, 0, 0, 307, 1370, 1, 0, 0, 0, 309, 1382, 1, 0, 0, 0, 311, 1387, 1, 0, 0, 0, 313, 1397, 1, 0, 0, 0, 315, 1403, 1, 0, 0, 0, 317, 1413, 1, 0, 0, 0, 319, 1423, 1, 0, 0, 0, 321, 1431, 1, 0, 0, 0, 323, 1441, 1, 0, 0, 0, 325, 1451, 1, 0, 0, 0, 327, 1462, 1, 0, 0, 0, 329, 1466, 1, 0, 0, 0, 331, 1477, 1, 0, 0, 0, 333, 1482, 1, 0, 0, 0, 335, 1492, 1, 0, 0, 0, 337, 1498, 1, 0, 0, 0, 339, 1511, 1, 0, 0, 0, 341, 1516, 1, 0, 0, 0, 343, 1527, 1, 0, 0, 0, 345, 1537, 1, 0, 0, 0, 347, 1544, 1, 0, 0, 0, 349, 1551, 1, 0, 0, 0, 351, 1556, 1, 0, 0, 0, 353, 1562, 1, 0, 0, 0, 355, 1569, 1, 0, 0, 0, 357, 1575, 1, 0, 0, 0, 359, 1581, 1, 0, 0, 0, 361, 1586, 1, 0, 0, 0, 363, 1593, 1, 0, 0, 0, 365, 1600, 1, 0, 0, 0, 367, 1608, 1, 0, 0, 0, 369, 1613, 1, 0, 0, 0, 371, 1620, 1, 0, 0, 0, 373, 1623, 1, 0, 0, 0, 375, 1666, 1, 0, 0, 0, 377, 1709, 1, 0, 0, 0, 379, 1711, 1, 0, 0, 0, 381, 1718, 1, 0, 0, 0, 383, 1721, 1, 0, 0, 0, 385, 1732, 1, 0, 0, 0, 387, 1735, 1, 0, 0, 0, 389, 1753, 1, 0, 0, 0, 391, 1767, 1, 0, 0, 0, 393, 1771, 1, 0, 0, 0, 395, 1773, 1, 0, 0, 0, 397, 1775, 1, 0, 0, 0, 399, 1777, 1, 0, 0, 0, 401, 1779, 1, 0, 0, 0, 403, 1781, 1, 0, 0, 0, 405, 1783, 1, 0, 0, 0, 407, 1785, 1, 0, 0, 0, 409, 1787, 1, 0, 0, 0, 411, 1789, 1, 0, 0, 0, 413, 1791, 1, 0, 0, 0, 415, 1793, 1, 0, 0, 0, 417, 1795, 1, 0, 0, 0, 419, 1797, 1, 0, 0, 0, 421, 1799, 1, 0, 0, 0, 423, 1801, 1, 0, 0, 0, 425, 1803, 1, 0, 0, 0, 427, 1805, 1, 0, 0, 0, 429, 1807, 1, 0, 0, 0, 431, 1809, 1, 0, 0, 0, 433, 1811, 1, 0, 0, 0, 435, 1813, 1, 0, 0, 0, 437, 1815, 1, 0, 0, 0, 439, 1817, 1, 0, 0, 0, 441, 1819, 1, 0, 0, 0, 443, 1821, 1, 0, 0, 0, 445, 1823, 1, 0, 0, 0, 447, 1825, 1, 0, 0, 0, 449, 1827, 1, 0, 0, 0, 451, 452, 5, 59, 0, 0, 452, 2, 1, 0, 0, 0, 453, 454, 5, 46, 0, 0, 454, 4, 1, 0, 0, 0, 455, 456, 5, 40, 0, 0, 456, 6, 1, 0, 0, 0, 457, 458, 5, 41, 0, 0, 458, 8, 1, 0, 0, 0, 459, 460, 5, 44, 0, 0, 460, 10, 1, 0, 0, 0, 461, 462, 5, 61, 0, 0, 462, 12, 1, 0, 0, 0, 463, 464, 5, 42, 0, 0, 464, 14, 1, 0, 0, 0, 465, 466, 5, 43, 0, 0, 466, 16, 1, 0, 0, 0, 467, 468, 5, 45, 0, 0, 468, 469, 5, 62, 0, 0, 469, 470, 5, 62, 0, 0, 470, 18, 1, 0, 0, 0, 471, 472, 5, 45, 0, 0, 472, 473, 5, 62, 0, 0, 473, 20, 1, 0, 0, 0, 474, 475, 5, 45, 0, 0, 475, 22, 1, 0, 0, 0, 476, 477, 5, 126, 0, 0, 477, 24, 1, 0, 0, 0, 478, 479, 5, 124, 0, 0, 479, 480, 5, 124, 0, 0, 480, 26, 1, 0, 0, 0, 481, 482, 5, 47, 0, 0, 482, 28, 1, 0, 0, 0, 483, 484, 5, 37, 0, 0, 484, 30, 1, 0, 0, 0, 485, 486, 5, 60, 0, 0, 486, 487, 5, 60, 0, 0, 487, 32, 1, 0, 0, 0, 488, 489, 5, 62, 0, 0, 489, 490, 5, 62, 0, 0, 490, 34, 1, 0, 0, 0, 491, 492, 5, 38, 0, 0, 492, 36, 1, 0, 0, 0, 493, 494, 5, 124, 0, 0, 494, 38, 1, 0, 0, 0, 495, 496, 5, 60, 0, 0, 496, 40, 1, 0, 0, 0, 497, 498, 5, 60, 0, 0, 498, 499, 5, 61, 0, 0, 499, 42, 1, 0, 0, 0, 500, 501, 5, 62, 0, 0, 501, 44, 1, 0, 0, 0, 502, 503, 5, 62, 0, 0, 503, 504, 5, 61, 0, 0, 504, 46, 1, 0, 0, 0, 505, 506, 5, 61, 0, 0, 506, 507, 5, 61, 0, 0, 507, 48, 1, 0, 0, 0, 508, 509, 5, 33, 0, 0, 509, 510, 5, 61, 0, 0, 510, 50, 1, 0, 0, 0, 511, 512, 5, 60, 0, 0, 512, 513, 5, 62, 0, 0, 513, 52, 1, 0, 0, 0, 514, 515, 3, 399, 199, 0, 515, 516, 3, 401, 200, 0, 516, 517, 3, 427, 213, 0, 517, 518, 3, 433, 216, 0, 518, 519, 3, 437, 218, 0, 519, 54, 1, 0, 0, 0, 520, 521, 3, 399, 199, 0, 521, 522, 3, 403, 201, 0, 522, 523, 3, 437, 218, 0, 523, 524, 3, 415, 207, 0, 524, 525, 3, 427, 213, 0, 525, 526, 3, 425, 212, 0, 526, 56, 1, 0, 0, 0, 527, 528, 3, 399, 199, 0, 528, 529, 3, 405, 202, 0, 529, 530, 3, 405, 202, 0, 530, 58, 1, 0, 0, 0, 531, 532, 3, 399, 199, 0, 532, 533, 3, 409, 204, 0, 533, 534, 3, 437, 218, 0, 534, 535, 3, 407, 203, 0, 535, 536, 3, 433, 216, 0, 536, 60, 1, 0, 0, 0, 537, 538, 3, 399, 199, 0, 538, 539, 3, 421, 210, 0, 539, 540, 3, 421, 210, 0, 540, 62, 1, 0, 0, 0, 541, 542, 3, 399, 199, 0, 542, 543, 3, 421, 210, 0, 543, 544, 3, 437, 218, 0, 544, 545, 3, 407, 203, 0, 545, 546, 3, 433, 216, 0, 546, 64, 1, 0, 0, 0, 547, 548, 3, 399, 199, 0, 548, 549, 3, 425, 212, 0, 549, 550, 3, 399, 199, 0, 550, 551, 3, 421, 210, 0, 551, 552, 3, 447, 223, 0, 552, 553, 3, 449, 224, 0, 553, 554, 3, 407, 203, 0, 554, 66, 1, 0, 0, 0, 555, 556, 3, 399, 199, 0, 556, 557, 3, 425, 212, 0, 557, 558, 3, 405, 202, 0, 558, 68, 1, 0, 0, 0, 559, 560, 3, 399, 199, 0, 560, 561, 3, 435, 217, 0, 561, 70, 1, 0, 0, 0, 562, 563, 3, 399, 199, 0, 563, 564, 3, 435, 217, 0, 564, 565, 3, 403, 201, 0, 565, 72, 1, 0, 0, 0, 566, 567, 3, 399, 199, 0, 567, 568, 3, 437, 218, 0, 568, 569, 3, 437, 218, 0, 569, 570, 3, 399, 199, 0, 570, 571, 3, 403, 201, 0, 571, 572, 3, 413, 206, 0, 572, 74, 1, 0, 0, 0, 573, 574, 3, 399, 199, 0, 574, 575, 3, 439, 219, 0, 575, 576, 3, 437, 218, 0, 576, 577, 3, 427, 213, 0, 577, 578, 3, 415, 207, 0, 578, 579, 3, 425, 212, 0, 579, 580, 3, 403, 201, 0, 580, 581, 3, 433, 216, 0, 581, 582, 3, 407, 203, 0, 582, 583, 3, 423, 211, 0, 583, 584, 3, 407, 203, 0, 584, 585, 3, 425, 212, 0, 585, 586, 3, 437, 218, 0, 586, 76, 1, 0, 0, 0, 587, 588, 3, 401, 200, 0, 588, 589, 3, 407, 203, 0, 589, 590, 3, 409, 204, 0, 590, 591, 3, 427, 213, 0, 591, 592, 3, 433, 216, 0, 592, 593, 3, 407, 203, 0, 593, 78, 1, 0, 0, 0, 594, 595, 3, 401, 200, 0, 595, 596, 3, 407, 203, 0, 596, 597, 3, 411, 205, 0, 597, 598, 3, 415, 207, 0, 598, 599, 3, 425, 212, 0, 599, 80, 1, 0, 0, 0, 600, 601, 3, 401, 200, 0, 601, 602, 3, 407, 203, 0, 602, 603, 3, 437, 218, 0, 603, 604, 3, 443, 221, 0, 604, 605, 3, 407, 203, 0, 605, 606, 3, 407, 203, 0, 606, 607, 3, 425, 212, 0, 607, 82, 1, 0, 0, 0, 608, 609, 3, 401, 200, 0, 609, 610, 3, 447, 223, 0, 610, 84, 1, 0, 0, 0, 611, 612, 3, 403, 201, 0, 612, 613, 3, 399, 199, 0, 613, 614, 3, 435, 217, 0, 614, 615, 3, 403, 201, 0, 615, 616, 3, 399, 199, 0, 616, 617, 3, 405, 202, 0, 617, 618, 3, 407, 203, 0, 618, 86, 1, 0, 0, 0, 619, 620, 3, 403, 201, 0, 620, 621, 3, 399, 199, 0, 621, 622, 3, 435, 217, 0, 622, 623, 3, 407, 203, 0, 623, 88, 1, 0, 0, 0, 624, 625, 3, 403, 201, 0, 625, 626, 3, 399, 199, 0, 626, 627, 3, 435, 217, 0, 627, 628, 3, 437, 218, 0, 628, 90, 1, 0, 0, 0, 629, 630, 3, 403, 201, 0, 630, 631, 3, 413, 206, 0, 631, 632, 3, 407, 203, 0, 632, 633, 3, 403, 201, 0, 633, 634, 3, 419, 209, 0, 634, 92, 1, 0, 0, 0, 635, 636, 3, 403, 201, 0, 636, 637, 3, 427, 213, 0, 637, 638, 3, 421, 210, 0, 638, 639, 3, 421, 210, 0, 639, 640, 3, 399, 199, 0, 640, 641, 3, 437, 218, 0, 641, 642, 3, 407, 203, 0, 642, 94, 1, 0, 0, 0, 643, 644, 3, 403, 201, 0, 644, 645, 3, 427, 213, 0, 645, 646, 3, 421, 210, 0, 646, 647, 3, 439, 219, 0, 647, 648, 3, 423, 211, 0, 648, 649, 3, 425, 212, 0, 649, 96, 1, 0, 0, 0, 650, 651, 3, 403, 201, 0, 651, 652, 3, 427, 213, 0, 652, 653, 3, 423, 211, 0, 653, 654, 3, 423, 211, 0, 654, 655, 3, 415, 207, 0, 655, 656, 3, 437, 218, 0, 656, 98, 1, 0, 0, 0, 657, 658, 3, 403, 201, 0, 658, 659, 3, 427, 213, 0, 659, 660, 3, 425, 212, 0, 660, 661, 3, 409, 204, 0, 661, 662, 3, 421, 210, 0, 662, 663, 3, 415, 207, 0, 663, 664, 3, 403, 201, 0, 664, 665, 3, 437, 218, 0, 665, 100, 1, 0, 0, 0, 666, 667, 3, 403, 201, 0, 667, 668, 3, 427, 213, 0, 668, 669, 3, 425, 212, 0, 669, 670, 3, 435, 217, 0, 670, 671, 3, 437, 218, 0, 671, 672, 3, 433, 216, 0, 672, 673, 3, 399, 199, 0, 673, 674, 3, 415, 207, 0, 674, 675, 3, 425, 212, 0, 675, 676, 3, 437, 218, 0, 676, 102, 1, 0, 0, 0, 677, 678, 3, 403, 201, 0, 678, 679, 3, 433, 216, 0, 679, 680, 3, 407, 203, 0, 680, 681, 3, 399, 199, 0, 681, 682, 3, 437, 218, 0, 682, 683, 3, 407, 203, 0, 683, 104, 1, 0, 0, 0, 684, 685, 3, 403, 201, 0, 685, 686, 3, 433, 216, 0, 686, 687, 3, 427, 213, 0, 687, 688, 3, 435, 217, 0, 688, 689, 3, 435, 217, 0, 689, 106, 1, 0, 0, 0, 690, 691, 3, 403, 201, 0, 691, 692, 3, 439, 219, 0, 692, 693, 3, 433, 216, 0, 693, 694, 3, 433, 216, 0, 694, 695, 3, 407, 203, 0, 695, 696, 3, 425, 212, 0, 696, 697, 3, 437, 218, 0, 697, 698, 5, 95, 0, 0, 698, 699, 3, 405, 202, 0, 699, 700, 3, 399, 199, 0, 700, 701, 3, 437, 218, 0, 701, 702, 3, 407, 203, 0, 702, 108, 1, 0, 0, 0, 703, 704, 3, 403, 201, 0, 704, 705, 3, 439, 219, 0, 705, 706, 3, 433, 216, 0, 706, 707, 3, 433, 216, 0, 707, 708, 3, 407, 203, 0, 708, 709, 3, 425, 212, 0, 709, 710, 3, 437, 218, 0, 710, 711, 5, 95, 0, 0, 711, 712, 3, 437, 218, 0, 712, 713, 3, 415, 207, 0, 713, 714, 3, 423, 211, 0, 714, 715, 3, 407, 203, 0, 715, 110, 1, 0, 0, 0, 716, 717, 3, 403, 201, 0, 717, 718, 3, 439, 219, 0, 718, 719, 3, 433, 216, 0, 719, 720, 3, 433, 216, 0, 720, 721, 3, 407, 203, 0, 721, 722, 3, 425, 212, 0, 722, 723, 3, 437, 218, 0, 723, 724, 5, 95, 0, 0, 724, 725, 3, 437, 218, 0, 725, 726, 3, 415, 207, 0, 726, 727, 3, 423, 211, 0, 727, 728, 3, 407, 203, 0, 728, 729, 3, 435, 217, 0, 729, 730, 3, 437, 218, 0, 730, 731, 3, 399, 199, 0, 731, 732, 3, 423, 211, 0, 732, 733, 3, 429, 214, 0, 733, 112, 1, 0, 0, 0, 734, 735, 3, 405, 202, 0, 735, 736, 3, 399, 199, 0, 736, 737, 3, 437, 218, 0, 737, 738, 3, 399, 199, 0, 738, 739, 3, 401, 200, 0, 739, 740, 3, 399, 199, 0, 740, 741, 3, 435, 217, 0, 741, 742, 3, 407, 203, 0, 742, 114, 1, 0, 0, 0, 743, 744, 3, 405, 202, 0, 744, 745, 3, 407, 203, 0, 745, 746, 3, 409, 204, 0, 746, 747, 3, 399, 199, 0, 747, 748, 3, 439, 219, 0, 748, 749, 3, 421, 210, 0, 749, 750, 3, 437, 218, 0, 750, 116, 1, 0, 0, 0, 751, 752, 3, 405, 202, 0, 752, 753, 3, 407, 203, 0, 753, 754, 3, 409, 204, 0, 754, 755, 3, 407, 203, 0, 755, 756, 3, 433, 216, 0, 756, 757, 3, 433, 216, 0, 757, 758, 3, 399, 199, 0, 758, 759, 3, 401, 200, 0, 759, 760, 3, 421, 210, 0, 760, 761, 3, 407, 203, 0, 761, 118, 1, 0, 0, 0, 762, 763, 3, 405, 202, 0, 763, 764, 3, 407, 203, 0, 764, 765, 3, 409, 204, 0, 765, 766, 3, 407, 203, 0, 766, 767, 3, 433, 216, 0, 767, 768, 3, 433, 216, 0, 768, 769, 3, 407, 203, 0, 769, 770, 3, 405, 202, 0, 770, 120, 1, 0, 0, 0, 771, 772, 3, 405, 202, 0, 772, 773, 3, 407, 203, 0, 773, 774, 3, 421, 210, 0, 774, 775, 3, 407, 203, 0, 775, 776, 3, 437, 218, 0, 776, 777, 3, 407, 203, 0, 777, 122, 1, 0, 0, 0, 778, 779, 3, 405, 202, 0, 779, 780, 3, 407, 203, 0, 780, 781, 3, 435, 217, 0, 781, 782, 3, 403, 201, 0, 782, 124, 1, 0, 0, 0, 783, 784, 3, 405, 202, 0, 784, 785, 3, 407, 203, 0, 785, 786, 3, 437, 218, 0, 786, 787, 3, 399, 199, 0, 787, 788, 3, 403, 201, 0, 788, 789, 3, 413, 206, 0, 789, 126, 1, 0, 0, 0, 790, 791, 3, 405, 202, 0, 791, 792, 3, 415, 207, 0, 792, 793, 3, 435, 217, 0, 793, 794, 3, 437, 218, 0, 794, 795, 3, 415, 207, 0, 795, 796, 3, 425, 212, 0, 796, 797, 3, 403, 201, 0, 797, 798, 3, 437, 218, 0, 798, 128, 1, 0, 0, 0, 799, 800, 3, 405, 202, 0, 800, 801, 3, 433, 216, 0, 801, 802, 3, 427, 213, 0, 802, 803, 3, 429, 214, 0, 803, 130, 1, 0, 0, 0, 804, 805, 3, 407, 203, 0, 805, 806, 3, 399, 199, 0, 806, 807, 3, 403, 201, 0, 807, 808, 3, 413, 206, 0, 808, 132, 1, 0, 0, 0, 809, 810, 3, 407, 203, 0, 810, 811, 3, 421, 210, 0, 811, 812, 3, 435, 217, 0, 812, 813, 3, 407, 203, 0, 813, 134, 1, 0, 0, 0, 814, 815, 3, 407, 203, 0, 815, 816, 3, 425, 212, 0, 816, 817, 3, 405, 202, 0, 817, 136, 1, 0, 0, 0, 818, 819, 3, 407, 203, 0, 819, 820, 3, 435, 217, 0, 820, 821, 3, 403, 201, 0, 821, 822, 3, 399, 199, 0, 822, 823, 3, 429, 214, 0, 823, 824, 3, 407, 203, 0, 824, 138, 1, 0, 0, 0, 825, 826, 3, 407, 203, 0, 826, 827, 3, 445, 222, 0, 827, 828, 3, 403, 201, 0, 828, 829, 3, 407, 203, 0, 829, 830, 3, 429, 214, 0, 830, 831, 3, 437, 218, 0, 831, 140, 1, 0, 0, 0, 832, 833, 3, 407, 203, 0, 833, 834, 3, 445, 222, 0, 834, 835, 3, 403, 201, 0, 835, 836, 3, 421, 210, 0, 836, 837, 3, 439, 219, 0, 837, 838, 3, 435, 217, 0, 838, 839, 3, 415, 207, 0, 839, 840, 3, 441, 220, 0, 840, 841, 3, 407, 203, 0, 841, 142, 1, 0, 0, 0, 842, 843, 3, 407, 203, 0, 843, 844, 3, 445, 222, 0, 844, 845, 3, 415, 207, 0, 845, 846, 3, 435, 217, 0, 846, 847, 3, 437, 218, 0, 847, 848, 3, 435, 217, 0, 848, 144, 1, 0, 0, 0, 849, 850, 3, 407, 203, 0, 850, 851, 3, 445, 222, 0, 851, 852, 3, 429, 214, 0, 852, 853, 3, 421, 210, 0, 853, 854, 3, 399, 199, 0, 854, 855, 3, 415, 207, 0, 855, 856, 3, 425, 212, 0, 856, 146, 1, 0, 0, 0, 857, 858, 3, 409, 204, 0, 858, 859, 3, 399, 199, 0, 859, 860, 3, 415, 207, 0, 860, 861, 3, 421, 210, 0, 861, 148, 1, 0, 0, 0, 862, 863, 3, 409, 204, 0, 863, 864, 3, 427, 213, 0, 864, 865, 3, 433, 216, 0, 865, 150, 1, 0, 0, 0, 866, 867, 3, 409, 204, 0, 867, 868, 3, 427, 213, 0, 868, 869, 3, 433, 216, 0, 869, 870, 3, 407, 203, 0, 870, 871, 3, 415, 207, 0, 871, 872, 3, 411, 205, 0, 872, 873, 3, 425, 212, 0, 873, 152, 1, 0, 0, 0, 874, 875, 3, 409, 204, 0, 875, 876, 3, 433, 216, 0, 876, 877, 3, 427, 213, 0, 877, 878, 3, 423, 211, 0, 878, 154, 1, 0, 0, 0, 879, 880, 3, 409, 204, 0, 880, 881, 3, 439, 219, 0, 881, 882, 3, 421, 210, 0, 882, 883, 3, 421, 210, 0, 883, 156, 1, 0, 0, 0, 884, 885, 3, 411, 205, 0, 885, 886, 3, 421, 210, 0, 886, 887, 3, 427, 213, 0, 887, 888, 3, 401, 200, 0, 888, 158, 1, 0, 0, 0, 889, 890, 3, 411, 205, 0, 890, 891, 3, 433, 216, 0, 891, 892, 3, 427, 213, 0, 892, 893, 3, 439, 219, 0, 893, 894, 3, 429, 214, 0, 894, 160, 1, 0, 0, 0, 895, 896, 3, 413, 206, 0, 896, 897, 3, 399, 199, 0, 897, 898, 3, 441, 220, 0, 898, 899, 3, 415, 207, 0, 899, 900, 3, 425, 212, 0, 900, 901, 3, 411, 205, 0, 901, 162, 1, 0, 0, 0, 902, 903, 3, 415, 207, 0, 903, 904, 3, 409, 204, 0, 904, 164, 1, 0, 0, 0, 905, 906, 3, 415, 207, 0, 906, 907, 3, 411, 205, 0, 907, 908, 3, 425, 212, 0, 908, 909, 3, 427, 213, 0, 909, 910, 3, 433, 216, 0, 910, 911, 3, 407, 203, 0, 911, 166, 1, 0, 0, 0, 912, 913, 3, 415, 207, 0, 913, 914, 3, 423, 211, 0, 914, 915, 3, 423, 211, 0, 915, 916, 3, 407, 203, 0, 916, 917, 3, 405, 202, 0, 917, 918, 3, 415, 207, 0, 918, 919, 3, 399, 199, 0, 919, 920, 3, 437, 218, 0, 920, 921, 3, 407, 203, 0, 921, 168, 1, 0, 0, 0, 922, 923, 3, 415, 207, 0, 923, 924, 3, 425, 212, 0, 924, 170, 1, 0, 0, 0, 925, 926, 3, 415, 207, 0, 926, 927, 3, 425, 212, 0, 927, 928, 3, 405, 202, 0, 928, 929, 3, 407, 203, 0, 929, 930, 3, 445, 222, 0, 930, 172, 1, 0, 0, 0, 931, 932, 3, 415, 207, 0, 932, 933, 3, 425, 212, 0, 933, 934, 3, 405, 202, 0, 934, 935, 3, 407, 203, 0, 935, 936, 3, 445, 222, 0, 936, 937, 3, 407, 203, 0, 937, 938, 3, 405, 202, 0, 938, 174, 1, 0, 0, 0, 939, 940, 3, 415, 207, 0, 940, 941, 3, 425, 212, 0, 941, 942, 3, 415, 207, 0, 942, 943, 3, 437, 218, 0, 943, 944, 3, 415, 207, 0, 944, 945, 3, 399, 199, 0, 945, 946, 3, 421, 210, 0, 946, 947, 3, 421, 210, 0, 947, 948, 3, 447, 223, 0, 948, 176, 1, 0, 0, 0, 949, 950, 3, 415, 207, 0, 950, 951, 3, 425, 212, 0, 951, 952, 3, 425, 212, 0, 952, 953, 3, 407, 203, 0, 953, 954, 3, 433, 216, 0, 954, 178, 1, 0, 0, 0, 955, 956, 3, 415, 207, 0, 956, 957, 3, 425, 212, 0, 957, 958, 3, 435, 217, 0, 958, 959, 3, 407, 203, 0, 959, 960, 3, 433, 216, 0, 960, 961, 3, 437, 218, 0, 961, 180, 1, 0, 0, 0, 962, 963, 3, 415, 207, 0, 963, 964, 3, 425, 212, 0, 964, 965, 3, 435, 217, 0, 965, 966, 3, 437, 218, 0, 966, 967, 3, 407, 203, 0, 967, 968, 3, 399, 199, 0, 968, 969, 3, 405, 202, 0, 969, 182, 1, 0, 0, 0, 970, 971, 3, 415, 207, 0, 971, 972, 3, 425, 212, 0, 972, 973, 3, 437, 218, 0, 973, 974, 3, 407, 203, 0, 974, 975, 3, 433, 216, 0, 975, 976, 3, 435, 217, 0, 976, 977, 3, 407, 203, 0, 977, 978, 3, 403, 201, 0, 978, 979, 3, 437, 218, 0, 979, 184, 1, 0, 0, 0, 980, 981, 3, 415, 207, 0, 981, 982, 3, 425, 212, 0, 982, 983, 3, 437, 218, 0, 983, 984, 3, 427, 213, 0, 984, 186, 1, 0, 0, 0, 985, 986, 3, 415, 207, 0, 986, 987, 3, 435, 217, 0, 987, 188, 1, 0, 0, 0, 988, 989, 3, 415, 207, 0, 989, 990, 3, 435, 217, 0, 990, 991, 3, 425, 212, 0, 991, 992, 3, 439, 219, 0, 992, 993, 3, 421, 210, 0, 993, 994, 3, 421, 210, 0, 994, 190, 1, 0, 0, 0, 995, 996, 3, 417, 208, 0, 996, 997, 3, 427, 213, 0, 997, 998, 3, 415, 207, 0, 998, 999, 3, 425, 212, 0, 999, 192, 1, 0, 0, 0, 1000, 1001, 3, 419, 209, 0, 1001, 1002, 3, 407, 203, 0, 1002, 1003, 3, 447, 223, 0, 1003, 194, 1, 0, 0, 0, 1004, 1005, 3, 421, 210, 0, 1005, 1006, 3, 407, 203, 0, 1006, 1007, 3, 409, 204, 0, 1007, 1008, 3, 437, 218, 0, 1008, 196, 1, 0, 0, 0, 1009, 1010, 3, 421, 210, 0, 1010, 1011, 3, 415, 207, 0, 1011, 1012, 3, 419, 209, 0, 1012, 1013, 3, 407, 203, 0, 1013, 198, 1, 0, 0, 0, 1014, 1015, 3, 421, 210, 0, 1015, 1016, 3, 415, 207, 0, 1016, 1017, 3, 423, 211, 0, 1017, 1018, 3, 415, 207, 0, 1018, 1019, 3, 437, 218, 0, 1019, 200, 1, 0, 0, 0, 1020, 1021, 3, 423, 211, 0, 1021, 1022, 3, 399, 199, 0, 1022, 1023, 3, 437, 218, 0, 1023, 1024, 3, 403, 201, 0, 1024, 1025, 3, 413, 206, 0, 1025, 202, 1, 0, 0, 0, 1026, 1027, 3, 425, 212, 0, 1027, 1028, 3, 399, 199, 0, 1028, 1029, 3, 437, 218, 0, 1029, 1030, 3, 439, 219, 0, 1030, 1031, 3, 433, 216, 0, 1031, 1032, 3, 399, 199, 0, 1032, 1033, 3, 421, 210, 0, 1033, 204, 1, 0, 0, 0, 1034, 1035, 3, 425, 212, 0, 1035, 1036, 3, 427, 213, 0, 1036, 206, 1, 0, 0, 0, 1037, 1038, 3, 425, 212, 0, 1038, 1039, 3, 427, 213, 0, 1039, 1040, 3, 437, 218, 0, 1040, 208, 1, 0, 0, 0, 1041, 1042, 3, 425, 212, 0, 1042, 1043, 3, 427, 213, 0, 1043, 1044, 3, 437, 218, 0, 1044, 1045, 3, 425, 212, 0, 1045, 1046, 3, 439, 219, 0, 1046, 1047, 3, 421, 210, 0, 1047, 1048, 3, 421, 210, 0, 1048, 210, 1, 0, 0, 0, 1049, 1050, 3, 425, 212, 0, 1050, 1051, 3, 439, 219, 0, 1051, 1052, 3, 421, 210, 0, 1052, 1053, 3, 421, 210, 0, 1053, 212, 1, 0, 0, 0, 1054, 1055, 3, 427, 213, 0, 1055, 1056, 3, 409, 204, 0, 1056, 214, 1, 0, 0, 0, 1057, 1058, 3, 427, 213, 0, 1058, 1059, 3, 409, 204, 0, 1059, 1060, 3, 409, 204, 0, 1060, 1061, 3, 435, 217, 0, 1061, 1062, 3, 407, 203, 0, 1062, 1063, 3, 437, 218, 0, 1063, 216, 1, 0, 0, 0, 1064, 1065, 3, 427, 213, 0, 1065, 1066, 3, 425, 212, 0, 1066, 218, 1, 0, 0, 0, 1067, 1068, 3, 427, 213, 0, 1068, 1069, 3, 433, 216, 0, 1069, 220, 1, 0, 0, 0, 1070, 1071, 3, 427, 213, 0, 1071, 1072, 3, 433, 216, 0, 1072, 1073, 3, 405, 202, 0, 1073, 1074, 3, 407, 203, 0, 1074, 1075, 3, 433, 216, 0, 1075, 222, 1, 0, 0, 0, 1076, 1077, 3, 427, 213, 0, 1077, 1078, 3, 439, 219, 0, 1078, 1079, 3, 437, 218, 0, 1079, 1080, 3, 407, 203, 0, 1080, 1081, 3, 433, 216, 0, 1081, 224, 1, 0, 0, 0, 1082, 1083, 3, 429, 214, 0, 1083, 1084, 3, 421, 210, 0, 1084, 1085, 3, 399, 199, 0, 1085, 1086, 3, 425, 212, 0, 1086, 226, 1, 0, 0, 0, 1087, 1088, 3, 429, 214, 0, 1088, 1089, 3, 433, 216, 0, 1089, 1090, 3, 399, 199, 0, 1090, 1091, 3, 411, 205, 0, 1091, 1092, 3, 423, 211, 0, 1092, 1093, 3, 399, 199, 0, 1093, 228, 1, 0, 0, 0, 1094, 1095, 3, 429, 214, 0, 1095, 1096, 3, 433, 216, 0, 1096, 1097, 3, 415, 207, 0, 1097, 1098, 3, 423, 211, 0, 1098, 1099, 3, 399, 199, 0, 1099, 1100, 3, 433, 216, 0, 1100, 1101, 3, 447, 223, 0, 1101, 230, 1, 0, 0, 0, 1102, 1103, 3, 431, 215, 0, 1103, 1104, 3, 439, 219, 0, 1104, 1105, 3, 407, 203, 0, 1105, 1106, 3, 433, 216, 0, 1106, 1107, 3, 447, 223, 0, 1107, 232, 1, 0, 0, 0, 1108, 1109, 3, 433, 216, 0, 1109, 1110, 3, 399, 199, 0, 1110, 1111, 3, 415, 207, 0, 1111, 1112, 3, 435, 217, 0, 1112, 1113, 3, 407, 203, 0, 1113, 234, 1, 0, 0, 0, 1114, 1115, 3, 433, 216, 0, 1115, 1116, 3, 407, 203, 0, 1116, 1117, 3, 403, 201, 0, 1117, 1118, 3, 439, 219, 0, 1118, 1119, 3, 433, 216, 0, 1119, 1120, 3, 435, 217, 0, 1120, 1121, 3, 415, 207, 0, 1121, 1122, 3, 441, 220, 0, 1122, 1123, 3, 407, 203, 0, 1123, 236, 1, 0, 0, 0, 1124, 1125, 3, 433, 216, 0, 1125, 1126, 3, 407, 203, 0, 1126, 1127, 3, 409, 204, 0, 1127, 1128, 3, 407, 203, 0, 1128, 1129, 3, 433, 216, 0, 1129, 1130, 3, 407, 203, 0, 1130, 1131, 3, 425, 212, 0, 1131, 1132, 3, 403, 201, 0, 1132, 1133, 3, 407, 203, 0, 1133, 1134, 3, 435, 217, 0, 1134, 238, 1, 0, 0, 0, 1135, 1136, 3, 433, 216, 0, 1136, 1137, 3, 407, 203, 0, 1137, 1138, 3, 411, 205, 0, 1138, 1139, 3, 407, 203, 0, 1139, 1140, 3, 445, 222, 0, 1140, 1141, 3, 429, 214, 0, 1141, 240, 1, 0, 0, 0, 1142, 1143, 3, 433, 216, 0, 1143, 1144, 3, 407, 203, 0, 1144, 1145, 3, 415, 207, 0, 1145, 1146, 3, 425, 212, 0, 1146, 1147, 3, 405, 202, 0, 1147, 1148, 3, 407, 203, 0, 1148, 1149, 3, 445, 222, 0, 1149, 242, 1, 0, 0, 0, 1150, 1151, 3, 433, 216, 0, 1151, 1152, 3, 407, 203, 0, 1152, 1153, 3, 421, 210, 0, 1153, 1154, 3, 407, 203, 0, 1154, 1155, 3, 399, 199, 0, 1155, 1156, 3, 435, 217, 0, 1156, 1157, 3, 407, 203, 0, 1157, 244, 1, 0, 0, 0, 1158, 1159, 3, 433, 216, 0, 1159, 1160, 3, 407, 203, 0, 1160, 1161, 3, 425, 212, 0, 1161, 1162, 3, 399, 199, 0, 1162, 1163, 3, 423, 211, 0, 1163, 1164, 3, 407, 203, 0, 1164, 246, 1, 0, 0, 0, 1165, 1166, 3, 433, 216, 0, 1166, 1167, 3, 407, 203, 0, 1167, 1168, 3, 429, 214, 0, 1168, 1169, 3, 421, 210, 0, 1169, 1170, 3, 399, 199, 0, 1170, 1171, 3, 403, 201, 0, 1171, 1172, 3, 407, 203, 0, 1172, 248, 1, 0, 0, 0, 1173, 1174, 3, 433, 216, 0, 1174, 1175, 3, 407, 203, 0, 1175, 1176, 3, 435, 217, 0, 1176, 1177, 3, 437, 218, 0, 1177, 1178, 3, 433, 216, 0, 1178, 1179, 3, 415, 207, 0, 1179, 1180, 3, 403, 201, 0, 1180, 1181, 3, 437, 218, 0, 1181, 250, 1, 0, 0, 0, 1182, 1183, 3, 433, 216, 0, 1183, 1184, 3, 407, 203, 0, 1184, 1185, 3, 437, 218, 0, 1185, 1186, 3, 439, 219, 0, 1186, 1187, 3, 433, 216, 0, 1187, 1188, 3, 425, 212, 0, 1188, 1189, 3, 415, 207, 0, 1189, 1190, 3, 425, 212, 0, 1190, 1191, 3, 411, 205, 0, 1191, 252, 1, 0, 0, 0, 1192, 1193, 3, 433, 216, 0, 1193, 1194, 3, 415, 207, 0, 1194, 1195, 3, 411, 205, 0, 1195, 1196, 3, 413, 206, 0, 1196, 1197, 3, 437, 218, 0, 1197, 254, 1, 0, 0, 0, 1198, 1199, 3, 433, 216, 0, 1199, 1200, 3, 427, 213, 0, 1200, 1201, 3, 421, 210, 0, 1201, 1202, 3, 421, 210, 0, 1202, 1203, 3, 401, 200, 0, 1203, 1204, 3, 399, 199, 0, 1204, 1205, 3, 403, 201, 0, 1205, 1206, 3, 419, 209, 0, 1206, 256, 1, 0, 0, 0, 1207, 1208, 3, 433, 216, 0, 1208, 1209, 3, 427, 213, 0, 1209, 1210, 3, 443, 221, 0, 1210, 258, 1, 0, 0, 0, 1211, 1212, 3, 433, 216, 0, 1212, 1213, 3, 427, 213, 0, 1213, 1214, 3, 443, 221, 0, 1214, 1215, 3, 435, 217, 0, 1215, 260, 1, 0, 0, 0, 1216, 1217, 3, 435, 217, 0, 1217, 1218, 3, 399, 199, 0, 1218, 1219, 3, 441, 220, 0, 1219, 1220, 3, 407, 203, 0, 1220, 1221, 3, 429, 214, 0, 1221, 1222, 3, 427, 213, 0, 1222, 1223, 3, 415, 207, 0, 1223, 1224, 3, 425, 212, 0, 1224, 1225, 3, 437, 218, 0, 1225, 262, 1, 0, 0, 0, 1226, 1227, 3, 435, 217, 0, 1227, 1228, 3, 407, 203, 0, 1228, 1229, 3, 421, 210, 0, 1229, 1230, 3, 407, 203, 0, 1230, 1231, 3, 403, 201, 0, 1231, 1232, 3, 437, 218, 0, 1232, 264, 1, 0, 0, 0, 1233, 1234, 3, 435, 217, 0, 1234, 1235, 3, 407, 203, 0, 1235, 1236, 3, 437, 218, 0, 1236, 266, 1, 0, 0, 0, 1237, 1238, 3, 435, 217, 0, 1238, 1239, 3, 437, 218, 0, 1239, 1240, 3, 433, 216, 0, 1240, 1241, 3, 415, 207, 0, 1241, 1242, 3, 403, 201, 0, 1242, 1243, 3, 437, 218, 0, 1243, 268, 1, 0, 0, 0, 1244, 1245, 3, 437, 218, 0, 1245, 1246, 3, 399, 199, 0, 1246, 1247, 3, 401, 200, 0, 1247, 1248, 3, 421, 210, 0, 1248, 1249, 3, 407, 203, 0, 1249, 270, 1, 0, 0, 0, 1250, 1251, 3, 437, 218, 0, 1251, 1252, 3, 407, 203, 0, 1252, 1253, 3, 423, 211, 0, 1253, 1254, 3, 429, 214, 0, 1254, 272, 1, 0, 0, 0, 1255, 1256, 3, 437, 218, 0, 1256, 1257, 3, 407, 203, 0, 1257, 1258, 3, 423, 211, 0, 1258, 1259, 3, 429, 214, 0, 1259, 1260, 3, 427, 213, 0, 1260, 1261, 3, 433, 216, 0, 1261, 1262, 3, 399, 199, 0, 1262, 1263, 3, 433, 216, 0, 1263, 1264, 3, 447, 223, 0, 1264, 274, 1, 0, 0, 0, 1265, 1266, 3, 437, 218, 0, 1266, 1267, 3, 413, 206, 0, 1267, 1268, 3, 407, 203, 0, 1268, 1269, 3, 425, 212, 0, 1269, 276, 1, 0, 0, 0, 1270, 1271, 3, 437, 218, 0, 1271, 1272, 3, 427, 213, 0, 1272, 278, 1, 0, 0, 0, 1273, 1274, 3, 437, 218, 0, 1274, 1275, 3, 433, 216, 0, 1275, 1276, 3, 399, 199, 0, 1276, 1277, 3, 425, 212, 0, 1277, 1278, 3, 435, 217, 0, 1278, 1279, 3, 399, 199, 0, 1279, 1280, 3, 403, 201, 0, 1280, 1281, 3, 437, 218, 0, 1281, 1282, 3, 415, 207, 0, 1282, 1283, 3, 427, 213, 0, 1283, 1284, 3, 425, 212, 0, 1284, 280, 1, 0, 0, 0, 1285, 1286, 3, 437, 218, 0, 1286, 1287, 3, 433, 216, 0, 1287, 1288, 3, 415, 207, 0, 1288, 1289, 3, 411, 205, 0, 1289, 1290, 3, 411, 205, 0, 1290, 1291, 3, 407, 203, 0, 1291, 1292, 3, 433, 216, 0, 1292, 282, 1, 0, 0, 0, 1293, 1294, 3, 439, 219, 0, 1294, 1295, 3, 425, 212, 0, 1295, 1296, 3, 415, 207, 0, 1296, 1297, 3, 427, 213, 0, 1297, 1298, 3, 425, 212, 0, 1298, 284, 1, 0, 0, 0, 1299, 1300, 3, 439, 219, 0, 1300, 1301, 3, 425, 212, 0, 1301, 1302, 3, 415, 207, 0, 1302, 1303, 3, 431, 215, 0, 1303, 1304, 3, 439, 219, 0, 1304, 1305, 3, 407, 203, 0, 1305, 286, 1, 0, 0, 0, 1306, 1307, 3, 439, 219, 0, 1307, 1308, 3, 429, 214, 0, 1308, 1309, 3, 405, 202, 0, 1309, 1310, 3, 399, 199, 0, 1310, 1311, 3, 437, 218, 0, 1311, 1312, 3, 407, 203, 0, 1312, 288, 1, 0, 0, 0, 1313, 1314, 3, 439, 219, 0, 1314, 1315, 3, 435, 217, 0, 1315, 1316, 3, 415, 207, 0, 1316, 1317, 3, 425, 212, 0, 1317, 1318, 3, 411, 205, 0, 1318, 290, 1, 0, 0, 0, 1319, 1320, 3, 441, 220, 0, 1320, 1321, 3, 399, 199, 0, 1321, 1322, 3, 403, 201, 0, 1322, 1323, 3, 439, 219, 0, 1323, 1324, 3, 439, 219, 0, 1324, 1325, 3, 423, 211, 0, 1325, 292, 1, 0, 0, 0, 1326, 1327, 3, 441, 220, 0, 1327, 1328, 3, 399, 199, 0, 1328, 1329, 3, 421, 210, 0, 1329, 1330, 3, 439, 219, 0, 1330, 1331, 3, 407, 203, 0, 1331, 1332, 3, 435, 217, 0, 1332, 294, 1, 0, 0, 0, 1333, 1334, 3, 441, 220, 0, 1334, 1335, 3, 415, 207, 0, 1335, 1336, 3, 407, 203, 0, 1336, 1337, 3, 443, 221, 0, 1337, 296, 1, 0, 0, 0, 1338, 1339, 3, 441, 220, 0, 1339, 1340, 3, 415, 207, 0, 1340, 1341, 3, 433, 216, 0, 1341, 1342, 3, 437, 218, 0, 1342, 1343, 3, 439, 219, 0, 1343, 1344, 3, 399, 199, 0, 1344, 1345, 3, 421, 210, 0, 1345, 298, 1, 0, 0, 0, 1346, 1347, 3, 443, 221, 0, 1347, 1348, 3, 413, 206, 0, 1348, 1349, 3, 407, 203, 0, 1349, 1350, 3, 425, 212, 0, 1350, 300, 1, 0, 0, 0, 1351, 1352, 3, 443, 221, 0, 1352, 1353, 3, 413, 206, 0, 1353, 1354, 3, 407, 203, 0, 1354, 1355, 3, 433, 216, 0, 1355, 1356, 3, 407, 203, 0, 1356, 302, 1, 0, 0, 0, 1357, 1358, 3, 443, 221, 0, 1358, 1359, 3, 415, 207, 0, 1359, 1360, 3, 437, 218, 0, 1360, 1361, 3, 413, 206, 0, 1361, 304, 1, 0, 0, 0, 1362, 1363, 3, 443, 221, 0, 1363, 1364, 3, 415, 207, 0, 1364, 1365, 3, 437, 218, 0, 1365, 1366, 3, 413, 206, 0, 1366, 1367, 3, 427, 213, 0, 1367, 1368, 3, 439, 219, 0, 1368, 1369, 3, 437, 218, 0, 1369, 306, 1, 0, 0, 0, 1370, 1371, 3, 409, 204, 0, 1371, 1372, 3, 415, 207, 0, 1372, 1373, 3, 433, 216, 0, 1373, 1374, 3, 435, 217, 0, 1374, 1375, 3, 437, 218, 0, 1375, 1376, 5, 95, 0, 0, 1376, 1377, 3, 441, 220, 0, 1377, 1378, 3, 399, 199, 0, 1378, 1379, 3, 421, 210, 0, 1379, 1380, 3, 439, 219, 0, 1380, 1381, 3, 407, 203, 0, 1381, 308, 1, 0, 0, 0, 1382, 1383, 3, 427, 213, 0, 1383, 1384, 3, 441, 220, 0, 1384, 1385, 3, 407, 203, 0, 1385, 1386, 3, 433, 216, 0, 1386, 310, 1, 0, 0, 0, 1387, 1388, 3, 429, 214, 0, 1388, 1389, 3, 399, 199, 0, 1389, 1390, 3, 433, 216, 0, 1390, 1391, 3, 437, 218, 0, 1391, 1392, 3, 415, 207, 0, 1392, 1393, 3, 437, 218, 0, 1393, 1394, 3, 415, 207, 0, 1394, 1395, 3, 427, 213, 0, 1395, 1396, 3, 425, 212, 0, 1396, 312, 1, 0, 0, 0, 1397, 1398, 3, 433, 216, 0, 1398, 1399, 3, 399, 199, 0, 1399, 1400, 3, 425, 212, 0, 1400, 1401, 3, 411, 205, 0, 1401, 1402, 3, 407, 203, 0, 1402, 314, 1, 0, 0, 0, 1403, 1404, 3, 429, 214, 0, 1404, 1405, 3, 433, 216, 0, 1405, 1406, 3, 407, 203, 0, 1406, 1407, 3, 403, 201, 0, 1407, 1408, 3, 407, 203, 0, 1408, 1409, 3, 405, 202, 0, 1409, 1410, 3, 415, 207, 0, 1410, 1411, 3, 425, 212, 0, 1411, 1412, 3, 411, 205, 0, 1412, 316, 1, 0, 0, 0, 1413, 1414, 3, 439, 219, 0, 1414, 1415, 3, 425, 212, 0, 1415, 1416, 3, 401, 200, 0, 1416, 1417, 3, 427, 213, 0, 1417, 1418, 3, 439, 219, 0, 1418, 1419, 3, 425, 212, 0, 1419, 1420, 3, 405, 202, 0, 1420, 1421, 3, 407, 203, 0, 1421, 1422, 3, 405, 202, 0, 1422, 318, 1, 0, 0, 0, 1423, 1424, 3, 403, 201, 0, 1424, 1425, 3, 439, 219, 0, 1425, 1426, 3, 433, 216, 0, 1426, 1427, 3, 433, 216, 0, 1427, 1428, 3, 407, 203, 0, 1428, 1429, 3, 425, 212, 0, 1429, 1430, 3, 437, 218, 0, 1430, 320, 1, 0, 0, 0, 1431, 1432, 3, 409, 204, 0, 1432, 1433, 3, 427, 213, 0, 1433, 1434, 3, 421, 210, 0, 1434, 1435, 3, 421, 210, 0, 1435, 1436, 3, 427, 213, 0, 1436, 1437, 3, 443, 221, 0, 1437, 1438, 3, 415, 207, 0, 1438, 1439, 3, 425, 212, 0, 1439, 1440, 3, 411, 205, 0, 1440, 322, 1, 0, 0, 0, 1441, 1442, 3, 403, 201, 0, 1442, 1443, 3, 439, 219, 0, 1443, 1444, 3, 423, 211, 0, 1444, 1445, 3, 407, 203, 0, 1445, 1446, 5, 95, 0, 0, 1446, 1447, 3, 405, 202, 0, 1447, 1448, 3, 415, 207, 0, 1448, 1449, 3, 435, 217, 0, 1449, 1450, 3, 437, 218, 0, 1450, 324, 1, 0, 0, 0, 1451, 1452, 3, 405, 202, 0, 1452, 1453, 3, 407, 203, 0, 1453, 1454, 3, 425, 212, 0, 1454, 1455, 3, 435, 217, 0, 1455, 1456, 3, 407, 203, 0, 1456, 1457, 5, 95, 0, 0, 1457, 1458, 3, 433, 216, 0, 1458, 1459, 3, 399, 199, 0, 1459, 1460, 3, 425, 212, 0, 1460, 1461, 3, 419, 209, 0, 1461, 326, 1, 0, 0, 0, 1462, 1463, 3, 421, 210, 0, 1463, 1464, 3, 399, 199, 0, 1464, 1465, 3, 411, 205, 0, 1465, 328, 1, 0, 0, 0, 1466, 1467, 3, 421, 210, 0, 1467, 1468, 3, 399, 199, 0, 1468, 1469, 3, 435, 217, 0, 1469, 1470, 3, 437, 218, 0, 1470, 1471, 5, 95, 0, 0, 1471, 1472, 3, 441, 220, 0, 1472, 1473, 3, 399, 199, 0, 1473, 1474, 3, 421, 210, 0, 1474, 1475, 3, 439, 219, 0, 1475, 1476, 3, 407, 203, 0, 1476, 330, 1, 0, 0, 0, 1477, 1478, 3, 421, 210, 0, 1478, 1479, 3, 407, 203, 0, 1479, 1480, 3, 399, 199, 0, 1480, 1481, 3, 405, 202, 0, 1481, 332, 1, 0, 0, 0, 1482, 1483, 3, 425, 212, 0, 1483, 1484, 3, 437, 218, 0, 1484, 1485, 3, 413, 206, 0, 1485, 1486, 5, 95, 0, 0, 1486, 1487, 3, 441, 220, 0, 1487, 1488, 3, 399, 199, 0, 1488, 1489, 3, 421, 210, 0, 1489, 1490, 3, 439, 219, 0, 1490, 1491, 3, 407, 203, 0, 1491, 334, 1, 0, 0, 0, 1492, 1493, 3, 425, 212, 0, 1493, 1494, 3, 437, 218, 0, 1494, 1495, 3, 415, 207, 0, 1495, 1496, 3, 421, 210, 0, 1496, 1497, 3, 407, 203, 0, 1497, 336, 1, 0, 0, 0, 1498, 1499, 3, 429, 214, 0, 1499, 1500, 3, 407, 203, 0, 1500, 1501, 3, 433, 216, 0, 1501, 1502, 3, 403, 201, 0, 1502, 1503, 3, 407, 203, 0, 1503, 1504, 3, 425, 212, 0, 1504, 1505, 3, 437, 218, 0, 1505, 1506, 5, 95, 0, 0, 1506, 1507, 3, 433, 216, 0, 1507, 1508, 3, 399, 199, 0, 1508, 1509, 3, 425, 212, 0, 1509, 1510, 3, 419, 209, 0, 1510, 338, 1, 0, 0, 0, 1511, 1512, 3, 433, 216, 0, 1512, 1513, 3, 399, 199, 0, 1513, 1514, 3, 425, 212, 0, 1514, 1515, 3, 419, 209, 0, 1515, 340, 1, 0, 0, 0, 1516, 1517, 3, 433, 216, 0, 1517, 1518, 3, 427, 213, 0, 1518, 1519, 3, 443, 221, 0, 1519, 1520, 5, 95, 0, 0, 1520, 1521, 3, 425, 212, 0, 1521, 1522, 3, 439, 219, 0, 1522, 1523, 3, 423, 211, 0, 1523, 1524, 3, 401, 200, 0, 1524, 1525, 3, 407, 203, 0, 1525, 1526, 3, 433, 216, 0, 1526, 342, 1, 0, 0, 0, 1527, 1528, 3, 411, 205, 0, 1528, 1529, 3, 407, 203, 0, 1529, 1530, 3, 425, 212, 0, 1530, 1531, 3, 407, 203, 0, 1531, 1532, 3, 433, 216, 0, 1532, 1533, 3, 399, 199, 0, 1533, 1534, 3, 437, 218, 0, 1534, 1535, 3, 407, 203, 0, 1535, 1536, 3, 405, 202, 0, 1536, 344, 1, 0, 0, 0, 1537, 1538, 3, 399, 199, 0, 1538, 1539, 3, 421, 210, 0, 1539, 1540, 3, 443, 221, 0, 1540, 1541, 3, 399, 199, 0, 1541, 1542, 3, 447, 223, 0, 1542, 1543, 3, 435, 217, 0, 1543, 346, 1, 0, 0, 0, 1544, 1545, 3, 435, 217, 0, 1545, 1546, 3, 437, 218, 0, 1546, 1547, 3, 427, 213, 0, 1547, 1548, 3, 433, 216, 0, 1548, 1549, 3, 407, 203, 0, 1549, 1550, 3, 405, 202, 0, 1550, 348, 1, 0, 0, 0, 1551, 1552, 3, 437, 218, 0, 1552, 1553, 3, 433, 216, 0, 1553, 1554, 3, 439, 219, 0, 1554, 1555, 3, 407, 203, 0, 1555, 350, 1, 0, 0, 0, 1556, 1557, 3, 409, 204, 0, 1557, 1558, 3, 399, 199, 0, 1558, 1559, 3, 421, 210, 0, 1559, 1560, 3, 435, 217, 0, 1560, 1561, 3, 407, 203, 0, 1561, 352, 1, 0, 0, 0, 1562, 1563, 3, 443, 221, 0, 1563, 1564, 3, 415, 207, 0, 1564, 1565, 3, 425, 212, 0, 1565, 1566, 3, 405, 202, 0, 1566, 1567, 3, 427, 213, 0, 1567, 1568, 3, 443, 221, 0, 1568, 354, 1, 0, 0, 0, 1569, 1570, 3, 425, 212, 0, 1570, 1571, 3, 439, 219, 0, 1571, 1572, 3, 421, 210, 0, 1572, 1573, 3, 421, 210, 0, 1573, 1574, 3, 435, 217, 0, 1574, 356, 1, 0, 0, 0, 1575, 1576, 3, 409, 204, 0, 1576, 1577, 3, 415, 207, 0, 1577, 1578, 3, 433, 216, 0, 1578, 1579, 3, 435, 217, 0, 1579, 1580, 3, 437, 218, 0, 1580, 358, 1, 0, 0, 0, 1581, 1582, 3, 421, 210, 0, 1582, 1583, 3, 399, 199, 0, 1583, 1584, 3, 435, 217, 0, 1584, 1585, 3, 437, 218, 0, 1585, 360, 1, 0, 0, 0, 1586, 1587, 3, 409, 204, 0, 1587, 1588, 3, 415, 207, 0, 1588, 1589, 3, 421, 210, 0, 1589, 1590, 3, 437, 218, 0, 1590, 1591, 3, 407, 203, 0, 1591, 1592, 3, 433, 216, 0, 1592, 362, 1, 0, 0, 0, 1593, 1594, 3, 411, 205, 0, 1594, 1595, 3, 433, 216, 0, 1595, 1596, 3, 427, 213, 0, 1596, 1597, 3, 439, 219, 0, 1597, 1598, 3, 429, 214, 0, 1598, 1599, 3, 435, 217, 0, 1599, 364, 1, 0, 0, 0, 1600, 1601, 3, 407, 203, 0, 1601, 1602, 3, 445, 222, 0, 1602, 1603, 3, 403, 201, 0, 1603, 1604, 3, 421, 210, 0, 1604, 1605, 3, 439, 219, 0, 1605, 1606, 3, 405, 202, 0, 1606, 1607, 3, 407, 203, 0, 1607, 366, 1, 0, 0, 0, 1608, 1609, 3, 437, 218, 0, 1609, 1610, 3, 415, 207, 0, 1610, 1611, 3, 407, 203, 0, 1611, 1612, 3, 435, 217, 0, 1612, 368, 1, 0, 0, 0, 1613, 1614, 3, 427, 213, 0, 1614, 1615, 3, 437, 218, 0, 1615, 1616, 3, 413, 206, 0, 1616, 1617, 3, 407, 203, 0, 1617, 1618, 3, 433, 216, 0, 1618, 1619, 3, 435, 217, 0, 1619, 370, 1, 0, 0, 0, 1620, 1621, 3, 405, 202, 0, 1621, 1622, 3, 427, 213, 0, 1622, 372, 1, 0, 0, 0, 1623, 1624, 3, 425, 212, 0, 1624, 1625, 3, 427, 213, 0, 1625, 1626, 3, 437, 218, 0, 1626, 1627, 3, 413, 206, 0, 1627, 1628, 3, 415, 207, 0, 1628, 1629, 3, 425, 212, 0, 1629, 1630, 3, 411, 205, 0, 1630, 374, 1, 0, 0, 0, 1631, 1637, 5, 34, 0, 0, 1632, 1636, 8, 0, 0, 0, 1633, 1634, 5, 34, 0, 0, 1634, 1636, 5, 34, 0, 0, 1635, 1632, 1, 0, 0, 0, 1635, 1633, 1, 0, 0, 0, 1636, 1639, 1, 0, 0, 0, 1637, 1635, 1, 0, 0, 0, 1637, 1638, 1, 0, 0, 0, 1638, 1640, 1, 0, 0, 0, 1639, 1637, 1, 0, 0, 0, 1640, 1667, 5, 34, 0, 0, 1641, 1647, 5, 96, 0, 0, 1642, 1646, 8, 1, 0, 0, 1643, 1644, 5, 96, 0, 0, 1644, 1646, 5, 96, 0, 0, 1645, 1642, 1, 0, 0, 0, 1645, 1643, 1, 0, 0, 0, 1646, 1649, 1, 0, 0, 0, 1647, 1645, 1, 0, 0, 0, 1647, 1648, 1, 0, 0, 0, 1648, 1650, 1, 0, 0, 0, 1649, 1647, 1, 0, 0, 0, 1650, 1667, 5, 96, 0, 0, 1651, 1655, 5, 91, 0, 0, 1652, 1654, 8, 2, 0, 0, 1653, 1652, 1, 0, 0, 0, 1654, 1657, 1, 0, 0, 0, 1655, 1653, 1, 0, 0, 0, 1655, 1656, 1, 0, 0, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1655, 1, 0, 0, 0, 1658, 1667, 5, 93, 0, 0, 1659, 1663, 7, 3, 0, 0, 1660, 1662, 7, 4, 0, 0, 1661, 1660, 1, 0, 0, 0, 1662, 1665, 1, 0, 0, 0, 1663, 1661, 1, 0, 0, 0, 1663, 1664, 1, 0, 0, 0, 1664, 1667, 1, 0, 0, 0, 1665, 1663, 1, 0, 0, 0, 1666, 1631, 1, 0, 0, 0, 1666, 1641, 1, 0, 0, 0, 1666, 1651, 1, 0, 0, 0, 1666, 1659, 1, 0, 0, 0, 1667, 376, 1, 0, 0, 0, 1668, 1670, 3, 397, 198, 0, 1669, 1668, 1, 0, 0, 0, 1670, 1671, 1, 0, 0, 0, 1671, 1669, 1, 0, 0, 0, 1671, 1672, 1, 0, 0, 0, 1672, 1680, 1, 0, 0, 0, 1673, 1677, 5, 46, 0, 0, 1674, 1676, 3, 397, 198, 0, 1675, 1674, 1, 0, 0, 0, 1676, 1679, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1677, 1678, 1, 0, 0, 0, 1678, 1681, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1680, 1673, 1, 0, 0, 0, 1680, 1681, 1, 0, 0, 0, 1681, 1689, 1, 0, 0, 0, 1682, 1684, 5, 46, 0, 0, 1683, 1685, 3, 397, 198, 0, 1684, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1689, 1, 0, 0, 0, 1688, 1669, 1, 0, 0, 0, 1688, 1682, 1, 0, 0, 0, 1689, 1699, 1, 0, 0, 0, 1690, 1692, 3, 407, 203, 0, 1691, 1693, 7, 5, 0, 0, 1692, 1691, 1, 0, 0, 0, 1692, 1693, 1, 0, 0, 0, 1693, 1695, 1, 0, 0, 0, 1694, 1696, 3, 397, 198, 0, 1695, 1694, 1, 0, 0, 0, 1696, 1697, 1, 0, 0, 0, 1697, 1695, 1, 0, 0, 0, 1697, 1698, 1, 0, 0, 0, 1698, 1700, 1, 0, 0, 0, 1699, 1690, 1, 0, 0, 0, 1699, 1700, 1, 0, 0, 0, 1700, 1710, 1, 0, 0, 0, 1701, 1702, 5, 48, 0, 0, 1702, 1703, 5, 120, 0, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1706, 3, 395, 197, 0, 1705, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1705, 1, 0, 0, 0, 1707, 1708, 1, 0, 0, 0, 1708, 1710, 1, 0, 0, 0, 1709, 1688, 1, 0, 0, 0, 1709, 1701, 1, 0, 0, 0, 1710, 378, 1, 0, 0, 0, 1711, 1715, 5, 63, 0, 0, 1712, 1714, 3, 397, 198, 0, 1713, 1712, 1, 0, 0, 0, 1714, 1717, 1, 0, 0, 0, 1715, 1713, 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 380, 1, 0, 0, 0, 1717, 1715, 1, 0, 0, 0, 1718, 1719, 7, 6, 0, 0, 1719, 1720, 3, 375, 187, 0, 1720, 382, 1, 0, 0, 0, 1721, 1727, 5, 39, 0, 0, 1722, 1726, 8, 7, 0, 0, 1723, 1724, 5, 39, 0, 0, 1724, 1726, 5, 39, 0, 0, 1725, 1722, 1, 0, 0, 0, 1725, 1723, 1, 0, 0, 0, 1726, 1729, 1, 0, 0, 0, 1727, 1725, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1730, 1, 0, 0, 0, 1729, 1727, 1, 0, 0, 0, 1730, 1731, 5, 39, 0, 0, 1731, 384, 1, 0, 0, 0, 1732, 1733, 3, 445, 222, 0, 1733, 1734, 3, 383, 191, 0, 1734, 386, 1, 0, 0, 0, 1735, 1736, 5, 45, 0, 0, 1736, 1737, 5, 45, 0, 0, 1737, 1741, 1, 0, 0, 0, 1738, 1740, 8, 8, 0, 0, 1739, 1738, 1, 0, 0, 0, 1740, 1743, 1, 0, 0, 0, 1741, 1739, 1, 0, 0, 0, 1741, 1742, 1, 0, 0, 0, 1742, 1749, 1, 0, 0, 0, 1743, 1741, 1, 0, 0, 0, 1744, 1746, 5, 13, 0, 0, 1745, 1744, 1, 0, 0, 0, 1745, 1746, 1, 0, 0, 0, 1746, 1747, 1, 0, 0, 0, 1747, 1750, 5, 10, 0, 0, 1748, 1750, 5, 0, 0, 1, 1749, 1745, 1, 0, 0, 0, 1749, 1748, 1, 0, 0, 0, 1750, 1751, 1, 0, 0, 0, 1751, 1752, 6, 193, 0, 0, 1752, 388, 1, 0, 0, 0, 1753, 1754, 5, 47, 0, 0, 1754, 1755, 5, 42, 0, 0, 1755, 1759, 1, 0, 0, 0, 1756, 1758, 9, 0, 0, 0, 1757, 1756, 1, 0, 0, 0, 1758, 1761, 1, 0, 0, 0, 1759, 1760, 1, 0, 0, 0, 1759, 1757, 1, 0, 0, 0, 1760, 1762, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1762, 1763, 5, 42, 0, 0, 1763, 1764, 5, 47, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 6, 194, 0, 0, 1766, 390, 1, 0, 0, 0, 1767, 1768, 7, 9, 0, 0, 1768, 1769, 1, 0, 0, 0, 1769, 1770, 6, 195, 0, 0, 1770, 392, 1, 0, 0, 0, 1771, 1772, 9, 0, 0, 0, 1772, 394, 1, 0, 0, 0, 1773, 1774, 7, 10, 0, 0, 1774, 396, 1, 0, 0, 0, 1775, 1776, 7, 11, 0, 0, 1776, 398, 1, 0, 0, 0, 1777, 1778, 7, 12, 0, 0, 1778, 400, 1, 0, 0, 0, 1779, 1780, 7, 13, 0, 0, 1780, 402, 1, 0, 0, 0, 1781, 1782, 7, 14, 0, 0, 1782, 404, 1, 0, 0, 0, 1783, 1784, 7, 15, 0, 0, 1784, 406, 1, 0, 0, 0, 1785, 1786, 7, 16, 0, 0, 1786, 408, 1, 0, 0, 0, 1787, 1788, 7, 17, 0, 0, 1788, 410, 1, 0, 0, 0, 1789, 1790, 7, 18, 0, 0, 1790, 412, 1, 0, 0, 0, 1791, 1792, 7, 19, 0, 0, 1792, 414, 1, 0, 0, 0, 1793, 1794, 7, 20, 0, 0, 1794, 416, 1, 0, 0, 0, 1795, 1796, 7, 21, 0, 0, 1796, 418, 1, 0, 0, 0, 1797, 1798, 7, 22, 0, 0, 1798, 420, 1, 0, 0, 0, 1799, 1800, 7, 23, 0, 0, 1800, 422, 1, 0, 0, 0, 1801, 1802, 7, 24, 0, 0, 1802, 424, 1, 0, 0, 0, 1803, 1804, 7, 25, 0, 0, 1804, 426, 1, 0, 0, 0, 1805, 1806, 7, 26, 0, 0, 1806, 428, 1, 0, 0, 0, 1807, 1808, 7, 27, 0, 0, 1808, 430, 1, 0, 0, 0, 1809, 1810, 7, 28, 0, 0, 1810, 432, 1, 0, 0, 0, 1811, 1812, 7, 29, 0, 0, 1812, 434, 1, 0, 0, 0, 1813, 1814, 7, 30, 0, 0, 1814, 436, 1, 0, 0, 0, 1815, 1816, 7, 31, 0, 0, 1816, 438, 1, 0, 0, 0, 1817, 1818, 7, 32, 0, 0, 1818, 440, 1, 0, 0, 0, 1819, 1820, 7, 33, 0, 0, 1820, 442, 1, 0, 0, 0, 1821, 1822, 7, 34, 0, 0, 1822, 444, 1, 0, 0, 0, 1823, 1824, 7, 35, 0, 0, 1824, 446, 1, 0, 0, 0, 1825, 1826, 7, 36, 0, 0, 1826, 448, 1, 0, 0, 0, 1827, 1828, 7, 37, 0, 0, 1828, 450, 1, 0, 0, 0, 25, 0, 1635, 1637, 1645, 1647, 1655, 1663, 1666, 1671, 1677, 1680, 1686, 1688, 1692, 1697, 1699, 1707, 1709, 1715, 1725, 1727, 1741, 1745, 1749, 1759, 1, 0, 1, 0] \ No newline at end of file diff --git a/internal/engine/sqlite/parser/SQLiteLexer.tokens b/internal/engine/sqlite/parser/SQLiteLexer.tokens index 928604c851..6777c57bdc 100644 --- a/internal/engine/sqlite/parser/SQLiteLexer.tokens +++ b/internal/engine/sqlite/parser/SQLiteLexer.tokens @@ -6,193 +6,195 @@ COMMA=5 ASSIGN=6 STAR=7 PLUS=8 -MINUS=9 -TILDE=10 -PIPE2=11 -DIV=12 -MOD=13 -LT2=14 -GT2=15 -AMP=16 -PIPE=17 -LT=18 -LT_EQ=19 -GT=20 -GT_EQ=21 -EQ=22 -NOT_EQ1=23 -NOT_EQ2=24 -ABORT_=25 -ACTION_=26 -ADD_=27 -AFTER_=28 -ALL_=29 -ALTER_=30 -ANALYZE_=31 -AND_=32 -AS_=33 -ASC_=34 -ATTACH_=35 -AUTOINCREMENT_=36 -BEFORE_=37 -BEGIN_=38 -BETWEEN_=39 -BY_=40 -CASCADE_=41 -CASE_=42 -CAST_=43 -CHECK_=44 -COLLATE_=45 -COLUMN_=46 -COMMIT_=47 -CONFLICT_=48 -CONSTRAINT_=49 -CREATE_=50 -CROSS_=51 -CURRENT_DATE_=52 -CURRENT_TIME_=53 -CURRENT_TIMESTAMP_=54 -DATABASE_=55 -DEFAULT_=56 -DEFERRABLE_=57 -DEFERRED_=58 -DELETE_=59 -DESC_=60 -DETACH_=61 -DISTINCT_=62 -DROP_=63 -EACH_=64 -ELSE_=65 -END_=66 -ESCAPE_=67 -EXCEPT_=68 -EXCLUSIVE_=69 -EXISTS_=70 -EXPLAIN_=71 -FAIL_=72 -FOR_=73 -FOREIGN_=74 -FROM_=75 -FULL_=76 -GLOB_=77 -GROUP_=78 -HAVING_=79 -IF_=80 -IGNORE_=81 -IMMEDIATE_=82 -IN_=83 -INDEX_=84 -INDEXED_=85 -INITIALLY_=86 -INNER_=87 -INSERT_=88 -INSTEAD_=89 -INTERSECT_=90 -INTO_=91 -IS_=92 -ISNULL_=93 -JOIN_=94 -KEY_=95 -LEFT_=96 -LIKE_=97 -LIMIT_=98 -MATCH_=99 -NATURAL_=100 -NO_=101 -NOT_=102 -NOTNULL_=103 -NULL_=104 -OF_=105 -OFFSET_=106 -ON_=107 -OR_=108 -ORDER_=109 -OUTER_=110 -PLAN_=111 -PRAGMA_=112 -PRIMARY_=113 -QUERY_=114 -RAISE_=115 -RECURSIVE_=116 -REFERENCES_=117 -REGEXP_=118 -REINDEX_=119 -RELEASE_=120 -RENAME_=121 -REPLACE_=122 -RESTRICT_=123 -RETURNING_=124 -RIGHT_=125 -ROLLBACK_=126 -ROW_=127 -ROWS_=128 -SAVEPOINT_=129 -SELECT_=130 -SET_=131 -STRICT_=132 -TABLE_=133 -TEMP_=134 -TEMPORARY_=135 -THEN_=136 -TO_=137 -TRANSACTION_=138 -TRIGGER_=139 -UNION_=140 -UNIQUE_=141 -UPDATE_=142 -USING_=143 -VACUUM_=144 -VALUES_=145 -VIEW_=146 -VIRTUAL_=147 -WHEN_=148 -WHERE_=149 -WITH_=150 -WITHOUT_=151 -FIRST_VALUE_=152 -OVER_=153 -PARTITION_=154 -RANGE_=155 -PRECEDING_=156 -UNBOUNDED_=157 -CURRENT_=158 -FOLLOWING_=159 -CUME_DIST_=160 -DENSE_RANK_=161 -LAG_=162 -LAST_VALUE_=163 -LEAD_=164 -NTH_VALUE_=165 -NTILE_=166 -PERCENT_RANK_=167 -RANK_=168 -ROW_NUMBER_=169 -GENERATED_=170 -ALWAYS_=171 -STORED_=172 -TRUE_=173 -FALSE_=174 -WINDOW_=175 -NULLS_=176 -FIRST_=177 -LAST_=178 -FILTER_=179 -GROUPS_=180 -EXCLUDE_=181 -TIES_=182 -OTHERS_=183 -DO_=184 -NOTHING_=185 -IDENTIFIER=186 -NUMERIC_LITERAL=187 -NUMBERED_BIND_PARAMETER=188 -NAMED_BIND_PARAMETER=189 -STRING_LITERAL=190 -BLOB_LITERAL=191 -SINGLE_LINE_COMMENT=192 -MULTILINE_COMMENT=193 -SPACES=194 -UNEXPECTED_CHAR=195 +PTR2=9 +PTR=10 +MINUS=11 +TILDE=12 +PIPE2=13 +DIV=14 +MOD=15 +LT2=16 +GT2=17 +AMP=18 +PIPE=19 +LT=20 +LT_EQ=21 +GT=22 +GT_EQ=23 +EQ=24 +NOT_EQ1=25 +NOT_EQ2=26 +ABORT_=27 +ACTION_=28 +ADD_=29 +AFTER_=30 +ALL_=31 +ALTER_=32 +ANALYZE_=33 +AND_=34 +AS_=35 +ASC_=36 +ATTACH_=37 +AUTOINCREMENT_=38 +BEFORE_=39 +BEGIN_=40 +BETWEEN_=41 +BY_=42 +CASCADE_=43 +CASE_=44 +CAST_=45 +CHECK_=46 +COLLATE_=47 +COLUMN_=48 +COMMIT_=49 +CONFLICT_=50 +CONSTRAINT_=51 +CREATE_=52 +CROSS_=53 +CURRENT_DATE_=54 +CURRENT_TIME_=55 +CURRENT_TIMESTAMP_=56 +DATABASE_=57 +DEFAULT_=58 +DEFERRABLE_=59 +DEFERRED_=60 +DELETE_=61 +DESC_=62 +DETACH_=63 +DISTINCT_=64 +DROP_=65 +EACH_=66 +ELSE_=67 +END_=68 +ESCAPE_=69 +EXCEPT_=70 +EXCLUSIVE_=71 +EXISTS_=72 +EXPLAIN_=73 +FAIL_=74 +FOR_=75 +FOREIGN_=76 +FROM_=77 +FULL_=78 +GLOB_=79 +GROUP_=80 +HAVING_=81 +IF_=82 +IGNORE_=83 +IMMEDIATE_=84 +IN_=85 +INDEX_=86 +INDEXED_=87 +INITIALLY_=88 +INNER_=89 +INSERT_=90 +INSTEAD_=91 +INTERSECT_=92 +INTO_=93 +IS_=94 +ISNULL_=95 +JOIN_=96 +KEY_=97 +LEFT_=98 +LIKE_=99 +LIMIT_=100 +MATCH_=101 +NATURAL_=102 +NO_=103 +NOT_=104 +NOTNULL_=105 +NULL_=106 +OF_=107 +OFFSET_=108 +ON_=109 +OR_=110 +ORDER_=111 +OUTER_=112 +PLAN_=113 +PRAGMA_=114 +PRIMARY_=115 +QUERY_=116 +RAISE_=117 +RECURSIVE_=118 +REFERENCES_=119 +REGEXP_=120 +REINDEX_=121 +RELEASE_=122 +RENAME_=123 +REPLACE_=124 +RESTRICT_=125 +RETURNING_=126 +RIGHT_=127 +ROLLBACK_=128 +ROW_=129 +ROWS_=130 +SAVEPOINT_=131 +SELECT_=132 +SET_=133 +STRICT_=134 +TABLE_=135 +TEMP_=136 +TEMPORARY_=137 +THEN_=138 +TO_=139 +TRANSACTION_=140 +TRIGGER_=141 +UNION_=142 +UNIQUE_=143 +UPDATE_=144 +USING_=145 +VACUUM_=146 +VALUES_=147 +VIEW_=148 +VIRTUAL_=149 +WHEN_=150 +WHERE_=151 +WITH_=152 +WITHOUT_=153 +FIRST_VALUE_=154 +OVER_=155 +PARTITION_=156 +RANGE_=157 +PRECEDING_=158 +UNBOUNDED_=159 +CURRENT_=160 +FOLLOWING_=161 +CUME_DIST_=162 +DENSE_RANK_=163 +LAG_=164 +LAST_VALUE_=165 +LEAD_=166 +NTH_VALUE_=167 +NTILE_=168 +PERCENT_RANK_=169 +RANK_=170 +ROW_NUMBER_=171 +GENERATED_=172 +ALWAYS_=173 +STORED_=174 +TRUE_=175 +FALSE_=176 +WINDOW_=177 +NULLS_=178 +FIRST_=179 +LAST_=180 +FILTER_=181 +GROUPS_=182 +EXCLUDE_=183 +TIES_=184 +OTHERS_=185 +DO_=186 +NOTHING_=187 +IDENTIFIER=188 +NUMERIC_LITERAL=189 +NUMBERED_BIND_PARAMETER=190 +NAMED_BIND_PARAMETER=191 +STRING_LITERAL=192 +BLOB_LITERAL=193 +SINGLE_LINE_COMMENT=194 +MULTILINE_COMMENT=195 +SPACES=196 +UNEXPECTED_CHAR=197 ';'=1 '.'=2 '('=3 @@ -201,19 +203,21 @@ UNEXPECTED_CHAR=195 '='=6 '*'=7 '+'=8 -'-'=9 -'~'=10 -'||'=11 -'/'=12 -'%'=13 -'<<'=14 -'>>'=15 -'&'=16 -'|'=17 -'<'=18 -'<='=19 -'>'=20 -'>='=21 -'=='=22 -'!='=23 -'<>'=24 +'->>'=9 +'->'=10 +'-'=11 +'~'=12 +'||'=13 +'/'=14 +'%'=15 +'<<'=16 +'>>'=17 +'&'=18 +'|'=19 +'<'=20 +'<='=21 +'>'=22 +'>='=23 +'=='=24 +'!='=25 +'<>'=26 diff --git a/internal/engine/sqlite/parser/SQLiteParser.g4 b/internal/engine/sqlite/parser/SQLiteParser.g4 index d141603cbc..14ca873687 100644 --- a/internal/engine/sqlite/parser/SQLiteParser.g4 +++ b/internal/engine/sqlite/parser/SQLiteParser.g4 @@ -282,8 +282,9 @@ expr: | ((schema_name DOT)? table_name DOT)? column_name #expr_qualified_column_name | unary_operator expr #expr_unary | expr PIPE2 expr #expr_binary - | expr ( STAR | DIV | MOD) expr #expr_math_op - | expr ( PLUS | MINUS) expr #expr_math_op + | expr ( PTR | PTR2 ) expr #expr_binary + | expr ( STAR | DIV | MOD) expr #expr_binary + | expr ( PLUS | MINUS) expr #expr_binary | expr ( LT2 | GT2 | AMP | PIPE) expr #expr_comparison | expr ( LT | LT_EQ | GT | GT_EQ) expr #expr_comparison | expr ( @@ -304,8 +305,8 @@ expr: | ( schema_name DOT)? table_name | (schema_name DOT)? table_function_name OPEN_PAR (expr (COMMA expr)*)? CLOSE_PAR ) #expr_in_select - | expr AND_ expr #expr_binary - | expr OR_ expr #expr_binary + | expr AND_ expr #expr_bool + | expr OR_ expr #expr_bool | qualified_function_name OPEN_PAR ((DISTINCT_? expr ( COMMA expr)*) | STAR)? CLOSE_PAR filter_clause? over_clause? #expr_function | OPEN_PAR expr (COMMA expr)* CLOSE_PAR #expr_list | CAST_ OPEN_PAR expr AS_ type_name CLOSE_PAR #expr_cast @@ -358,9 +359,9 @@ insert_stmt: COMMA OPEN_PAR expr ( COMMA expr)* CLOSE_PAR )* | select_stmt + | DEFAULT_ VALUES_ ) upsert_clause? returning_clause? ) - | DEFAULT_ VALUES_ ; upsert_clause: diff --git a/internal/engine/sqlite/parser/SQLiteParser.interp b/internal/engine/sqlite/parser/SQLiteParser.interp index 2617e0bc04..7a268aa1a8 100644 --- a/internal/engine/sqlite/parser/SQLiteParser.interp +++ b/internal/engine/sqlite/parser/SQLiteParser.interp @@ -8,6 +8,8 @@ null '=' '*' '+' +'->>' +'->' '-' '~' '||' @@ -206,6 +208,8 @@ COMMA ASSIGN STAR PLUS +PTR2 +PTR MINUS TILDE PIPE2 @@ -513,4 +517,4 @@ any_name atn: -[4, 1, 195, 2175, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 1, 0, 5, 0, 232, 8, 0, 10, 0, 12, 0, 235, 9, 0, 1, 0, 1, 0, 1, 1, 5, 1, 240, 8, 1, 10, 1, 12, 1, 243, 9, 1, 1, 1, 1, 1, 4, 1, 247, 8, 1, 11, 1, 12, 1, 248, 1, 1, 5, 1, 252, 8, 1, 10, 1, 12, 1, 255, 9, 1, 1, 1, 5, 1, 258, 8, 1, 10, 1, 12, 1, 261, 9, 1, 1, 2, 1, 2, 1, 2, 3, 2, 266, 8, 2, 3, 2, 268, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 294, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 301, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 308, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 314, 8, 3, 1, 3, 1, 3, 3, 3, 318, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 323, 8, 3, 1, 3, 3, 3, 326, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 333, 8, 4, 1, 4, 3, 4, 336, 8, 4, 1, 5, 1, 5, 3, 5, 340, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 3, 6, 348, 8, 6, 1, 6, 1, 6, 3, 6, 352, 8, 6, 3, 6, 354, 8, 6, 1, 7, 1, 7, 3, 7, 358, 8, 7, 1, 8, 1, 8, 3, 8, 362, 8, 8, 1, 8, 1, 8, 3, 8, 366, 8, 8, 1, 8, 3, 8, 369, 8, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 376, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 382, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 388, 8, 11, 1, 11, 1, 11, 1, 11, 3, 11, 393, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 402, 8, 11, 10, 11, 12, 11, 405, 9, 11, 1, 11, 1, 11, 1, 11, 3, 11, 410, 8, 11, 1, 12, 1, 12, 3, 12, 414, 8, 12, 1, 12, 1, 12, 3, 12, 418, 8, 12, 1, 12, 3, 12, 421, 8, 12, 1, 13, 1, 13, 1, 13, 3, 13, 426, 8, 13, 1, 14, 1, 14, 3, 14, 430, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 436, 8, 14, 1, 14, 1, 14, 1, 14, 3, 14, 441, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 448, 8, 14, 10, 14, 12, 14, 451, 9, 14, 1, 14, 1, 14, 5, 14, 455, 8, 14, 10, 14, 12, 14, 458, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 464, 8, 14, 10, 14, 12, 14, 467, 9, 14, 3, 14, 469, 8, 14, 1, 14, 1, 14, 3, 14, 473, 8, 14, 1, 15, 1, 15, 3, 15, 477, 8, 15, 1, 15, 5, 15, 480, 8, 15, 10, 15, 12, 15, 483, 9, 15, 1, 16, 4, 16, 486, 8, 16, 11, 16, 12, 16, 487, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 500, 8, 16, 1, 17, 1, 17, 3, 17, 504, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 509, 8, 17, 1, 17, 3, 17, 512, 8, 17, 1, 17, 3, 17, 515, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 520, 8, 17, 1, 17, 3, 17, 523, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 537, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 544, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 551, 8, 17, 3, 17, 553, 8, 17, 1, 18, 3, 18, 556, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 562, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 567, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 573, 8, 19, 10, 19, 12, 19, 576, 9, 19, 1, 19, 1, 19, 3, 19, 580, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 593, 8, 19, 10, 19, 12, 19, 596, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 601, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 609, 8, 20, 10, 20, 12, 20, 612, 9, 20, 1, 20, 1, 20, 3, 20, 616, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 626, 8, 20, 1, 20, 1, 20, 5, 20, 630, 8, 20, 10, 20, 12, 20, 633, 9, 20, 1, 20, 3, 20, 636, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 641, 8, 20, 3, 20, 643, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 651, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 657, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 662, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 669, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 678, 8, 22, 10, 22, 12, 22, 681, 9, 22, 3, 22, 683, 8, 22, 3, 22, 685, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 692, 8, 22, 1, 22, 1, 22, 3, 22, 696, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 703, 8, 22, 1, 22, 1, 22, 4, 22, 707, 8, 22, 11, 22, 12, 22, 708, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 715, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 721, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 726, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 733, 8, 23, 10, 23, 12, 23, 736, 9, 23, 1, 23, 1, 23, 3, 23, 740, 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 751, 8, 24, 1, 24, 1, 24, 1, 24, 3, 24, 756, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 765, 8, 24, 10, 24, 12, 24, 768, 9, 24, 1, 24, 1, 24, 3, 24, 772, 8, 24, 1, 25, 1, 25, 3, 25, 776, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 790, 8, 25, 10, 25, 12, 25, 793, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 800, 8, 26, 10, 26, 12, 26, 803, 9, 26, 1, 26, 1, 26, 3, 26, 807, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 815, 8, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 825, 8, 28, 10, 28, 12, 28, 828, 9, 28, 1, 28, 1, 28, 3, 28, 832, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 843, 8, 29, 1, 29, 3, 29, 846, 8, 29, 3, 29, 848, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 854, 8, 29, 1, 29, 3, 29, 857, 8, 29, 3, 29, 859, 8, 29, 5, 29, 861, 8, 29, 10, 29, 12, 29, 864, 9, 29, 1, 30, 3, 30, 867, 8, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 874, 8, 30, 1, 30, 3, 30, 877, 8, 30, 1, 31, 3, 31, 880, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 887, 8, 31, 1, 31, 3, 31, 890, 8, 31, 1, 31, 3, 31, 893, 8, 31, 1, 31, 3, 31, 896, 8, 31, 1, 32, 1, 32, 3, 32, 900, 8, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 908, 8, 33, 1, 33, 1, 33, 1, 33, 3, 33, 913, 8, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 924, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 929, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 938, 8, 34, 1, 34, 1, 34, 1, 34, 5, 34, 943, 8, 34, 10, 34, 12, 34, 946, 9, 34, 1, 34, 3, 34, 949, 8, 34, 1, 34, 1, 34, 3, 34, 953, 8, 34, 1, 34, 3, 34, 956, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 962, 8, 34, 10, 34, 12, 34, 965, 9, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 977, 8, 34, 1, 34, 3, 34, 980, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 988, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 4, 34, 995, 8, 34, 11, 34, 12, 34, 996, 1, 34, 1, 34, 3, 34, 1001, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1006, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1032, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1039, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1050, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1059, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1067, 8, 34, 10, 34, 12, 34, 1070, 9, 34, 3, 34, 1072, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1078, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1084, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1091, 8, 34, 10, 34, 12, 34, 1094, 9, 34, 3, 34, 1096, 8, 34, 1, 34, 1, 34, 3, 34, 1100, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1107, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1113, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1120, 8, 34, 5, 34, 1122, 8, 34, 10, 34, 12, 34, 1125, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 1133, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3, 37, 1140, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1147, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1153, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1158, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1164, 8, 37, 10, 37, 12, 37, 1167, 9, 37, 1, 37, 1, 37, 3, 37, 1171, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1178, 8, 37, 10, 37, 12, 37, 1181, 9, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1189, 8, 37, 10, 37, 12, 37, 1192, 9, 37, 1, 37, 1, 37, 5, 37, 1196, 8, 37, 10, 37, 12, 37, 1199, 9, 37, 1, 37, 3, 37, 1202, 8, 37, 1, 37, 3, 37, 1205, 8, 37, 1, 37, 3, 37, 1208, 8, 37, 1, 37, 1, 37, 3, 37, 1212, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1220, 8, 38, 10, 38, 12, 38, 1223, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1228, 8, 38, 3, 38, 1230, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1238, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1245, 8, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1250, 8, 38, 10, 38, 12, 38, 1253, 9, 38, 1, 38, 1, 38, 3, 38, 1257, 8, 38, 3, 38, 1259, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1265, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1274, 8, 39, 1, 40, 1, 40, 1, 40, 3, 40, 1279, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1286, 8, 41, 1, 41, 1, 41, 3, 41, 1290, 8, 41, 3, 41, 1292, 8, 41, 1, 42, 3, 42, 1295, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 1301, 8, 42, 10, 42, 12, 42, 1304, 9, 42, 1, 42, 3, 42, 1307, 8, 42, 1, 42, 3, 42, 1310, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1317, 8, 43, 10, 43, 12, 43, 1320, 9, 43, 1, 44, 1, 44, 3, 44, 1324, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1329, 8, 44, 10, 44, 12, 44, 1332, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1338, 8, 44, 10, 44, 12, 44, 1341, 9, 44, 1, 44, 3, 44, 1344, 8, 44, 3, 44, 1346, 8, 44, 1, 44, 1, 44, 3, 44, 1350, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1357, 8, 44, 10, 44, 12, 44, 1360, 9, 44, 1, 44, 1, 44, 3, 44, 1364, 8, 44, 3, 44, 1366, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1377, 8, 44, 10, 44, 12, 44, 1380, 9, 44, 3, 44, 1382, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1389, 8, 44, 10, 44, 12, 44, 1392, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1400, 8, 44, 10, 44, 12, 44, 1403, 9, 44, 1, 44, 1, 44, 5, 44, 1407, 8, 44, 10, 44, 12, 44, 1410, 9, 44, 3, 44, 1412, 8, 44, 1, 45, 1, 45, 1, 46, 3, 46, 1417, 8, 46, 1, 46, 1, 46, 3, 46, 1421, 8, 46, 1, 46, 3, 46, 1424, 8, 46, 1, 47, 3, 47, 1427, 8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1432, 8, 47, 1, 47, 1, 47, 3, 47, 1436, 8, 47, 1, 47, 4, 47, 1439, 8, 47, 11, 47, 12, 47, 1440, 1, 47, 3, 47, 1444, 8, 47, 1, 47, 3, 47, 1447, 8, 47, 1, 48, 1, 48, 1, 48, 3, 48, 1452, 8, 48, 1, 48, 1, 48, 3, 48, 1456, 8, 48, 1, 48, 3, 48, 1459, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1466, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1471, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1478, 8, 48, 10, 48, 12, 48, 1481, 9, 48, 1, 48, 1, 48, 3, 48, 1485, 8, 48, 1, 48, 3, 48, 1488, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1494, 8, 48, 10, 48, 12, 48, 1497, 9, 48, 1, 48, 3, 48, 1500, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1508, 8, 48, 1, 48, 3, 48, 1511, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1516, 8, 48, 1, 48, 1, 48, 3, 48, 1520, 8, 48, 1, 48, 3, 48, 1523, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1530, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1535, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1542, 8, 48, 10, 48, 12, 48, 1545, 9, 48, 1, 48, 1, 48, 3, 48, 1549, 8, 48, 1, 48, 3, 48, 1552, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1558, 8, 48, 10, 48, 12, 48, 1561, 9, 48, 1, 48, 3, 48, 1564, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1572, 8, 48, 1, 48, 3, 48, 1575, 8, 48, 3, 48, 1577, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1586, 8, 49, 1, 49, 3, 49, 1589, 8, 49, 3, 49, 1591, 8, 49, 1, 50, 1, 50, 3, 50, 1595, 8, 50, 1, 50, 1, 50, 3, 50, 1599, 8, 50, 1, 50, 3, 50, 1602, 8, 50, 1, 50, 1, 50, 1, 50, 3, 50, 1607, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 5, 51, 1616, 8, 51, 10, 51, 12, 51, 1619, 9, 51, 1, 51, 1, 51, 3, 51, 1623, 8, 51, 1, 52, 1, 52, 3, 52, 1627, 8, 52, 1, 52, 1, 52, 3, 52, 1631, 8, 52, 1, 53, 3, 53, 1634, 8, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1639, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1645, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1652, 8, 53, 1, 53, 1, 53, 1, 53, 5, 53, 1657, 8, 53, 10, 53, 12, 53, 1660, 9, 53, 1, 53, 1, 53, 3, 53, 1664, 8, 53, 1, 53, 3, 53, 1667, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1673, 8, 54, 10, 54, 12, 54, 1676, 9, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1681, 8, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1686, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1692, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1699, 8, 55, 1, 55, 1, 55, 1, 55, 5, 55, 1704, 8, 55, 10, 55, 12, 55, 1707, 9, 55, 1, 55, 1, 55, 3, 55, 1711, 8, 55, 1, 55, 3, 55, 1714, 8, 55, 1, 55, 3, 55, 1717, 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1722, 8, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1727, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1734, 8, 56, 1, 57, 1, 57, 3, 57, 1738, 8, 57, 1, 57, 1, 57, 3, 57, 1742, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 3, 59, 1752, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1759, 8, 59, 10, 59, 12, 59, 1762, 9, 59, 3, 59, 1764, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1771, 8, 59, 10, 59, 12, 59, 1774, 9, 59, 1, 59, 3, 59, 1777, 8, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1785, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1792, 8, 60, 10, 60, 12, 60, 1795, 9, 60, 3, 60, 1797, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1804, 8, 60, 10, 60, 12, 60, 1807, 9, 60, 3, 60, 1809, 8, 60, 1, 60, 3, 60, 1812, 8, 60, 1, 60, 3, 60, 1815, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1825, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1834, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 1841, 8, 63, 10, 63, 12, 63, 1844, 9, 63, 1, 63, 3, 63, 1847, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 3, 64, 1854, 8, 64, 1, 64, 1, 64, 1, 64, 5, 64, 1859, 8, 64, 10, 64, 12, 64, 1862, 9, 64, 1, 64, 3, 64, 1865, 8, 64, 1, 64, 1, 64, 3, 64, 1869, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 5, 65, 1876, 8, 65, 10, 65, 12, 65, 1879, 9, 65, 1, 65, 3, 65, 1882, 8, 65, 1, 65, 1, 65, 3, 65, 1886, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1891, 8, 65, 1, 66, 1, 66, 3, 66, 1895, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1900, 8, 66, 10, 66, 12, 66, 1903, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 1910, 8, 67, 10, 67, 12, 67, 1913, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1919, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1924, 8, 69, 1, 69, 3, 69, 1927, 8, 69, 1, 69, 1, 69, 3, 69, 1931, 8, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 1945, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 1957, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1966, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1975, 8, 74, 1, 74, 1, 74, 3, 74, 1979, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1989, 8, 74, 1, 74, 3, 74, 1992, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2001, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2010, 8, 74, 1, 74, 3, 74, 2013, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2019, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2033, 8, 74, 1, 74, 1, 74, 3, 74, 2037, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2048, 8, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2053, 8, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 4, 77, 2064, 8, 77, 11, 77, 12, 77, 2065, 1, 78, 1, 78, 1, 78, 4, 78, 2071, 8, 78, 11, 78, 12, 78, 2072, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 2081, 8, 80, 1, 80, 1, 80, 1, 80, 3, 80, 2086, 8, 80, 5, 80, 2088, 8, 80, 10, 80, 12, 80, 2091, 9, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 3, 85, 2103, 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2116, 8, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 2173, 8, 114, 1, 114, 2, 449, 487, 1, 68, 115, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 0, 29, 3, 0, 58, 58, 69, 69, 82, 82, 2, 0, 47, 47, 66, 66, 1, 0, 134, 135, 2, 0, 147, 147, 172, 172, 1, 0, 8, 9, 2, 0, 59, 59, 142, 142, 2, 0, 56, 56, 104, 104, 2, 0, 58, 58, 82, 82, 5, 0, 25, 25, 72, 72, 81, 81, 122, 122, 126, 126, 4, 0, 84, 84, 133, 133, 139, 139, 146, 146, 2, 0, 7, 7, 12, 13, 1, 0, 14, 17, 1, 0, 18, 21, 4, 0, 77, 77, 97, 97, 99, 99, 118, 118, 3, 0, 25, 25, 72, 72, 126, 126, 5, 0, 52, 54, 104, 104, 173, 174, 187, 187, 190, 191, 2, 0, 29, 29, 62, 62, 3, 0, 76, 76, 96, 96, 125, 125, 3, 0, 128, 128, 155, 155, 180, 180, 2, 0, 5, 5, 106, 106, 1, 0, 177, 178, 2, 0, 34, 34, 60, 60, 2, 0, 152, 152, 163, 163, 2, 0, 160, 160, 167, 167, 2, 0, 161, 161, 168, 169, 2, 0, 162, 162, 164, 164, 2, 0, 8, 10, 102, 102, 2, 0, 186, 186, 190, 190, 1, 0, 25, 181, 2480, 0, 233, 1, 0, 0, 0, 2, 241, 1, 0, 0, 0, 4, 267, 1, 0, 0, 0, 6, 295, 1, 0, 0, 0, 8, 327, 1, 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, 345, 1, 0, 0, 0, 14, 355, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 370, 1, 0, 0, 0, 20, 373, 1, 0, 0, 0, 22, 379, 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, 26, 425, 1, 0, 0, 0, 28, 427, 1, 0, 0, 0, 30, 474, 1, 0, 0, 0, 32, 485, 1, 0, 0, 0, 34, 503, 1, 0, 0, 0, 36, 555, 1, 0, 0, 0, 38, 561, 1, 0, 0, 0, 40, 602, 1, 0, 0, 0, 42, 644, 1, 0, 0, 0, 44, 648, 1, 0, 0, 0, 46, 712, 1, 0, 0, 0, 48, 744, 1, 0, 0, 0, 50, 773, 1, 0, 0, 0, 52, 794, 1, 0, 0, 0, 54, 808, 1, 0, 0, 0, 56, 819, 1, 0, 0, 0, 58, 838, 1, 0, 0, 0, 60, 866, 1, 0, 0, 0, 62, 879, 1, 0, 0, 0, 64, 897, 1, 0, 0, 0, 66, 903, 1, 0, 0, 0, 68, 1005, 1, 0, 0, 0, 70, 1126, 1, 0, 0, 0, 72, 1136, 1, 0, 0, 0, 74, 1211, 1, 0, 0, 0, 76, 1213, 1, 0, 0, 0, 78, 1260, 1, 0, 0, 0, 80, 1278, 1, 0, 0, 0, 82, 1280, 1, 0, 0, 0, 84, 1294, 1, 0, 0, 0, 86, 1311, 1, 0, 0, 0, 88, 1411, 1, 0, 0, 0, 90, 1413, 1, 0, 0, 0, 92, 1416, 1, 0, 0, 0, 94, 1426, 1, 0, 0, 0, 96, 1576, 1, 0, 0, 0, 98, 1590, 1, 0, 0, 0, 100, 1606, 1, 0, 0, 0, 102, 1622, 1, 0, 0, 0, 104, 1630, 1, 0, 0, 0, 106, 1633, 1, 0, 0, 0, 108, 1668, 1, 0, 0, 0, 110, 1680, 1, 0, 0, 0, 112, 1721, 1, 0, 0, 0, 114, 1735, 1, 0, 0, 0, 116, 1743, 1, 0, 0, 0, 118, 1749, 1, 0, 0, 0, 120, 1780, 1, 0, 0, 0, 122, 1816, 1, 0, 0, 0, 124, 1826, 1, 0, 0, 0, 126, 1835, 1, 0, 0, 0, 128, 1850, 1, 0, 0, 0, 130, 1870, 1, 0, 0, 0, 132, 1892, 1, 0, 0, 0, 134, 1904, 1, 0, 0, 0, 136, 1914, 1, 0, 0, 0, 138, 1920, 1, 0, 0, 0, 140, 1932, 1, 0, 0, 0, 142, 1944, 1, 0, 0, 0, 144, 1956, 1, 0, 0, 0, 146, 1965, 1, 0, 0, 0, 148, 2052, 1, 0, 0, 0, 150, 2054, 1, 0, 0, 0, 152, 2057, 1, 0, 0, 0, 154, 2060, 1, 0, 0, 0, 156, 2067, 1, 0, 0, 0, 158, 2074, 1, 0, 0, 0, 160, 2078, 1, 0, 0, 0, 162, 2092, 1, 0, 0, 0, 164, 2094, 1, 0, 0, 0, 166, 2096, 1, 0, 0, 0, 168, 2098, 1, 0, 0, 0, 170, 2102, 1, 0, 0, 0, 172, 2104, 1, 0, 0, 0, 174, 2106, 1, 0, 0, 0, 176, 2108, 1, 0, 0, 0, 178, 2110, 1, 0, 0, 0, 180, 2115, 1, 0, 0, 0, 182, 2119, 1, 0, 0, 0, 184, 2121, 1, 0, 0, 0, 186, 2123, 1, 0, 0, 0, 188, 2125, 1, 0, 0, 0, 190, 2127, 1, 0, 0, 0, 192, 2129, 1, 0, 0, 0, 194, 2131, 1, 0, 0, 0, 196, 2133, 1, 0, 0, 0, 198, 2135, 1, 0, 0, 0, 200, 2137, 1, 0, 0, 0, 202, 2139, 1, 0, 0, 0, 204, 2141, 1, 0, 0, 0, 206, 2143, 1, 0, 0, 0, 208, 2145, 1, 0, 0, 0, 210, 2147, 1, 0, 0, 0, 212, 2149, 1, 0, 0, 0, 214, 2151, 1, 0, 0, 0, 216, 2153, 1, 0, 0, 0, 218, 2155, 1, 0, 0, 0, 220, 2157, 1, 0, 0, 0, 222, 2159, 1, 0, 0, 0, 224, 2161, 1, 0, 0, 0, 226, 2163, 1, 0, 0, 0, 228, 2172, 1, 0, 0, 0, 230, 232, 3, 2, 1, 0, 231, 230, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 0, 0, 1, 237, 1, 1, 0, 0, 0, 238, 240, 5, 1, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244, 253, 3, 4, 2, 0, 245, 247, 5, 1, 0, 0, 246, 245, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 3, 4, 2, 0, 251, 246, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 259, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 258, 5, 1, 0, 0, 257, 256, 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 3, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 265, 5, 71, 0, 0, 263, 264, 5, 114, 0, 0, 264, 266, 5, 111, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, 267, 262, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 293, 1, 0, 0, 0, 269, 294, 3, 6, 3, 0, 270, 294, 3, 8, 4, 0, 271, 294, 3, 10, 5, 0, 272, 294, 3, 12, 6, 0, 273, 294, 3, 14, 7, 0, 274, 294, 3, 22, 11, 0, 275, 294, 3, 28, 14, 0, 276, 294, 3, 44, 22, 0, 277, 294, 3, 46, 23, 0, 278, 294, 3, 48, 24, 0, 279, 294, 3, 60, 30, 0, 280, 294, 3, 62, 31, 0, 281, 294, 3, 64, 32, 0, 282, 294, 3, 66, 33, 0, 283, 294, 3, 74, 37, 0, 284, 294, 3, 78, 39, 0, 285, 294, 3, 82, 41, 0, 286, 294, 3, 20, 10, 0, 287, 294, 3, 16, 8, 0, 288, 294, 3, 18, 9, 0, 289, 294, 3, 84, 42, 0, 290, 294, 3, 106, 53, 0, 291, 294, 3, 110, 55, 0, 292, 294, 3, 114, 57, 0, 293, 269, 1, 0, 0, 0, 293, 270, 1, 0, 0, 0, 293, 271, 1, 0, 0, 0, 293, 272, 1, 0, 0, 0, 293, 273, 1, 0, 0, 0, 293, 274, 1, 0, 0, 0, 293, 275, 1, 0, 0, 0, 293, 276, 1, 0, 0, 0, 293, 277, 1, 0, 0, 0, 293, 278, 1, 0, 0, 0, 293, 279, 1, 0, 0, 0, 293, 280, 1, 0, 0, 0, 293, 281, 1, 0, 0, 0, 293, 282, 1, 0, 0, 0, 293, 283, 1, 0, 0, 0, 293, 284, 1, 0, 0, 0, 293, 285, 1, 0, 0, 0, 293, 286, 1, 0, 0, 0, 293, 287, 1, 0, 0, 0, 293, 288, 1, 0, 0, 0, 293, 289, 1, 0, 0, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 294, 5, 1, 0, 0, 0, 295, 296, 5, 30, 0, 0, 296, 300, 5, 133, 0, 0, 297, 298, 3, 182, 91, 0, 298, 299, 5, 2, 0, 0, 299, 301, 1, 0, 0, 0, 300, 297, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 325, 3, 184, 92, 0, 303, 313, 5, 121, 0, 0, 304, 305, 5, 137, 0, 0, 305, 314, 3, 188, 94, 0, 306, 308, 5, 46, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 3, 190, 95, 0, 310, 311, 5, 137, 0, 0, 311, 312, 3, 190, 95, 0, 312, 314, 1, 0, 0, 0, 313, 304, 1, 0, 0, 0, 313, 307, 1, 0, 0, 0, 314, 326, 1, 0, 0, 0, 315, 317, 5, 27, 0, 0, 316, 318, 5, 46, 0, 0, 317, 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 326, 3, 30, 15, 0, 320, 322, 5, 63, 0, 0, 321, 323, 5, 46, 0, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 326, 3, 190, 95, 0, 325, 303, 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, 325, 320, 1, 0, 0, 0, 326, 7, 1, 0, 0, 0, 327, 335, 5, 31, 0, 0, 328, 336, 3, 182, 91, 0, 329, 330, 3, 182, 91, 0, 330, 331, 5, 2, 0, 0, 331, 333, 1, 0, 0, 0, 332, 329, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 3, 186, 93, 0, 335, 328, 1, 0, 0, 0, 335, 332, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 9, 1, 0, 0, 0, 337, 339, 5, 35, 0, 0, 338, 340, 5, 55, 0, 0, 339, 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, 3, 68, 34, 0, 342, 343, 5, 33, 0, 0, 343, 344, 3, 182, 91, 0, 344, 11, 1, 0, 0, 0, 345, 347, 5, 38, 0, 0, 346, 348, 7, 0, 0, 0, 347, 346, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 353, 1, 0, 0, 0, 349, 351, 5, 138, 0, 0, 350, 352, 3, 212, 106, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 13, 1, 0, 0, 0, 355, 357, 7, 1, 0, 0, 356, 358, 5, 138, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 15, 1, 0, 0, 0, 359, 361, 5, 126, 0, 0, 360, 362, 5, 138, 0, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 368, 1, 0, 0, 0, 363, 365, 5, 137, 0, 0, 364, 366, 5, 129, 0, 0, 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 3, 206, 103, 0, 368, 363, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 17, 1, 0, 0, 0, 370, 371, 5, 129, 0, 0, 371, 372, 3, 206, 103, 0, 372, 19, 1, 0, 0, 0, 373, 375, 5, 120, 0, 0, 374, 376, 5, 129, 0, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 3, 206, 103, 0, 378, 21, 1, 0, 0, 0, 379, 381, 5, 50, 0, 0, 380, 382, 5, 141, 0, 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 387, 5, 84, 0, 0, 384, 385, 5, 80, 0, 0, 385, 386, 5, 102, 0, 0, 386, 388, 5, 70, 0, 0, 387, 384, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 392, 1, 0, 0, 0, 389, 390, 3, 182, 91, 0, 390, 391, 5, 2, 0, 0, 391, 393, 1, 0, 0, 0, 392, 389, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 395, 3, 196, 98, 0, 395, 396, 5, 107, 0, 0, 396, 397, 3, 184, 92, 0, 397, 398, 5, 3, 0, 0, 398, 403, 3, 24, 12, 0, 399, 400, 5, 5, 0, 0, 400, 402, 3, 24, 12, 0, 401, 399, 1, 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 409, 5, 4, 0, 0, 407, 408, 5, 149, 0, 0, 408, 410, 3, 68, 34, 0, 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 23, 1, 0, 0, 0, 411, 414, 3, 190, 95, 0, 412, 414, 3, 68, 34, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 416, 5, 45, 0, 0, 416, 418, 3, 192, 96, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 421, 3, 140, 70, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 25, 1, 0, 0, 0, 422, 423, 5, 151, 0, 0, 423, 426, 5, 186, 0, 0, 424, 426, 5, 132, 0, 0, 425, 422, 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 27, 1, 0, 0, 0, 427, 429, 5, 50, 0, 0, 428, 430, 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 435, 5, 133, 0, 0, 432, 433, 5, 80, 0, 0, 433, 434, 5, 102, 0, 0, 434, 436, 5, 70, 0, 0, 435, 432, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, 91, 0, 438, 439, 5, 2, 0, 0, 439, 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, 444, 5, 3, 0, 0, 444, 449, 3, 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, 3, 30, 15, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 453, 5, 5, 0, 0, 453, 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, 455, 458, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 459, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, 3, 26, 13, 0, 461, 462, 5, 5, 0, 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, 0, 0, 0, 464, 467, 1, 0, 0, 0, 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 473, 1, 0, 0, 0, 470, 471, 5, 33, 0, 0, 471, 473, 3, 84, 42, 0, 472, 443, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, 0, 0, 474, 476, 3, 190, 95, 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, 0, 479, 478, 1, 0, 0, 0, 480, 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482, 31, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, 176, 88, 0, 485, 484, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 487, 485, 1, 0, 0, 0, 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, 490, 491, 3, 36, 18, 0, 491, 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, 494, 5, 3, 0, 0, 494, 495, 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, 3, 36, 18, 0, 497, 498, 5, 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, 0, 0, 0, 499, 493, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, 0, 501, 502, 5, 49, 0, 0, 502, 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 552, 1, 0, 0, 0, 505, 506, 5, 113, 0, 0, 506, 508, 5, 95, 0, 0, 507, 509, 3, 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 511, 1, 0, 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 36, 0, 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, 517, 5, 102, 0, 0, 517, 520, 5, 104, 0, 0, 518, 520, 5, 141, 0, 0, 519, 516, 1, 0, 0, 0, 519, 518, 1, 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, 3, 42, 21, 0, 522, 521, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, 0, 0, 0, 524, 525, 5, 44, 0, 0, 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, 34, 0, 527, 528, 5, 4, 0, 0, 528, 553, 1, 0, 0, 0, 529, 536, 5, 56, 0, 0, 530, 537, 3, 36, 18, 0, 531, 537, 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, 533, 534, 3, 68, 34, 0, 534, 535, 5, 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, 530, 1, 0, 0, 0, 536, 531, 1, 0, 0, 0, 536, 532, 1, 0, 0, 0, 537, 553, 1, 0, 0, 0, 538, 539, 5, 45, 0, 0, 539, 553, 3, 192, 96, 0, 540, 553, 3, 40, 20, 0, 541, 542, 5, 170, 0, 0, 542, 544, 5, 171, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 5, 33, 0, 0, 546, 547, 5, 3, 0, 0, 547, 548, 3, 68, 34, 0, 548, 550, 5, 4, 0, 0, 549, 551, 7, 3, 0, 0, 550, 549, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, 553, 1, 0, 0, 0, 552, 505, 1, 0, 0, 0, 552, 519, 1, 0, 0, 0, 552, 524, 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552, 538, 1, 0, 0, 0, 552, 540, 1, 0, 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1, 0, 0, 0, 554, 556, 7, 4, 0, 0, 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 558, 5, 187, 0, 0, 558, 37, 1, 0, 0, 0, 559, 560, 5, 49, 0, 0, 560, 562, 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 600, 1, 0, 0, 0, 563, 564, 5, 113, 0, 0, 564, 567, 5, 95, 0, 0, 565, 567, 5, 141, 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12, 0, 570, 571, 5, 5, 0, 0, 571, 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0, 573, 576, 1, 0, 0, 0, 574, 572, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 577, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 577, 579, 5, 4, 0, 0, 578, 580, 3, 42, 21, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 601, 1, 0, 0, 0, 581, 582, 5, 44, 0, 0, 582, 583, 5, 3, 0, 0, 583, 584, 3, 68, 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, 1, 0, 0, 0, 586, 587, 5, 74, 0, 0, 587, 588, 5, 95, 0, 0, 588, 589, 5, 3, 0, 0, 589, 594, 3, 190, 95, 0, 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, 95, 0, 592, 590, 1, 0, 0, 0, 593, 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, 598, 5, 4, 0, 0, 598, 599, 3, 40, 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, 1, 0, 0, 0, 600, 581, 1, 0, 0, 0, 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, 0, 0, 602, 603, 5, 117, 0, 0, 603, 615, 3, 194, 97, 0, 604, 605, 5, 3, 0, 0, 605, 610, 3, 190, 95, 0, 606, 607, 5, 5, 0, 0, 607, 609, 3, 190, 95, 0, 608, 606, 1, 0, 0, 0, 609, 612, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 613, 1, 0, 0, 0, 612, 610, 1, 0, 0, 0, 613, 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0, 615, 604, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617, 618, 5, 107, 0, 0, 618, 625, 7, 5, 0, 0, 619, 620, 5, 131, 0, 0, 620, 626, 7, 6, 0, 0, 621, 626, 5, 41, 0, 0, 622, 626, 5, 123, 0, 0, 623, 624, 5, 101, 0, 0, 624, 626, 5, 26, 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0, 0, 0, 625, 622, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0, 627, 628, 5, 99, 0, 0, 628, 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 633, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 642, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 634, 636, 5, 102, 0, 0, 635, 634, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 640, 5, 57, 0, 0, 638, 639, 5, 86, 0, 0, 639, 641, 7, 7, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 643, 1, 0, 0, 0, 642, 635, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 41, 1, 0, 0, 0, 644, 645, 5, 107, 0, 0, 645, 646, 5, 48, 0, 0, 646, 647, 7, 8, 0, 0, 647, 43, 1, 0, 0, 0, 648, 650, 5, 50, 0, 0, 649, 651, 7, 2, 0, 0, 650, 649, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 656, 5, 139, 0, 0, 653, 654, 5, 80, 0, 0, 654, 655, 5, 102, 0, 0, 655, 657, 5, 70, 0, 0, 656, 653, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 661, 1, 0, 0, 0, 658, 659, 3, 182, 91, 0, 659, 660, 5, 2, 0, 0, 660, 662, 1, 0, 0, 0, 661, 658, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 668, 3, 198, 99, 0, 664, 669, 5, 37, 0, 0, 665, 669, 5, 28, 0, 0, 666, 667, 5, 89, 0, 0, 667, 669, 5, 105, 0, 0, 668, 664, 1, 0, 0, 0, 668, 665, 1, 0, 0, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 684, 1, 0, 0, 0, 670, 685, 5, 59, 0, 0, 671, 685, 5, 88, 0, 0, 672, 682, 5, 142, 0, 0, 673, 674, 5, 105, 0, 0, 674, 679, 3, 190, 95, 0, 675, 676, 5, 5, 0, 0, 676, 678, 3, 190, 95, 0, 677, 675, 1, 0, 0, 0, 678, 681, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 683, 1, 0, 0, 0, 681, 679, 1, 0, 0, 0, 682, 673, 1, 0, 0, 0, 682, 683, 1, 0, 0, 0, 683, 685, 1, 0, 0, 0, 684, 670, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, 684, 672, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, 686, 687, 5, 107, 0, 0, 687, 691, 3, 184, 92, 0, 688, 689, 5, 73, 0, 0, 689, 690, 5, 64, 0, 0, 690, 692, 5, 127, 0, 0, 691, 688, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 695, 1, 0, 0, 0, 693, 694, 5, 148, 0, 0, 694, 696, 3, 68, 34, 0, 695, 693, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 697, 1, 0, 0, 0, 697, 706, 5, 38, 0, 0, 698, 703, 3, 106, 53, 0, 699, 703, 3, 74, 37, 0, 700, 703, 3, 60, 30, 0, 701, 703, 3, 84, 42, 0, 702, 698, 1, 0, 0, 0, 702, 699, 1, 0, 0, 0, 702, 700, 1, 0, 0, 0, 702, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 705, 5, 1, 0, 0, 705, 707, 1, 0, 0, 0, 706, 702, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 1, 0, 0, 0, 710, 711, 5, 66, 0, 0, 711, 45, 1, 0, 0, 0, 712, 714, 5, 50, 0, 0, 713, 715, 7, 2, 0, 0, 714, 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 720, 5, 146, 0, 0, 717, 718, 5, 80, 0, 0, 718, 719, 5, 102, 0, 0, 719, 721, 5, 70, 0, 0, 720, 717, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 725, 1, 0, 0, 0, 722, 723, 3, 182, 91, 0, 723, 724, 5, 2, 0, 0, 724, 726, 1, 0, 0, 0, 725, 722, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727, 739, 3, 200, 100, 0, 728, 729, 5, 3, 0, 0, 729, 734, 3, 190, 95, 0, 730, 731, 5, 5, 0, 0, 731, 733, 3, 190, 95, 0, 732, 730, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 737, 738, 5, 4, 0, 0, 738, 740, 1, 0, 0, 0, 739, 728, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 742, 5, 33, 0, 0, 742, 743, 3, 84, 42, 0, 743, 47, 1, 0, 0, 0, 744, 745, 5, 50, 0, 0, 745, 746, 5, 147, 0, 0, 746, 750, 5, 133, 0, 0, 747, 748, 5, 80, 0, 0, 748, 749, 5, 102, 0, 0, 749, 751, 5, 70, 0, 0, 750, 747, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 755, 1, 0, 0, 0, 752, 753, 3, 182, 91, 0, 753, 754, 5, 2, 0, 0, 754, 756, 1, 0, 0, 0, 755, 752, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 3, 184, 92, 0, 758, 759, 5, 143, 0, 0, 759, 771, 3, 202, 101, 0, 760, 761, 5, 3, 0, 0, 761, 766, 3, 170, 85, 0, 762, 763, 5, 5, 0, 0, 763, 765, 3, 170, 85, 0, 764, 762, 1, 0, 0, 0, 765, 768, 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 766, 767, 1, 0, 0, 0, 767, 769, 1, 0, 0, 0, 768, 766, 1, 0, 0, 0, 769, 770, 5, 4, 0, 0, 770, 772, 1, 0, 0, 0, 771, 760, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 49, 1, 0, 0, 0, 773, 775, 5, 150, 0, 0, 774, 776, 5, 116, 0, 0, 775, 774, 1, 0, 0, 0, 775, 776, 1, 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 778, 3, 52, 26, 0, 778, 779, 5, 33, 0, 0, 779, 780, 5, 3, 0, 0, 780, 781, 3, 84, 42, 0, 781, 791, 5, 4, 0, 0, 782, 783, 5, 5, 0, 0, 783, 784, 3, 52, 26, 0, 784, 785, 5, 33, 0, 0, 785, 786, 5, 3, 0, 0, 786, 787, 3, 84, 42, 0, 787, 788, 5, 4, 0, 0, 788, 790, 1, 0, 0, 0, 789, 782, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 806, 3, 184, 92, 0, 795, 796, 5, 3, 0, 0, 796, 801, 3, 190, 95, 0, 797, 798, 5, 5, 0, 0, 798, 800, 3, 190, 95, 0, 799, 797, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 804, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804, 805, 5, 4, 0, 0, 805, 807, 1, 0, 0, 0, 806, 795, 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 53, 1, 0, 0, 0, 808, 809, 3, 52, 26, 0, 809, 810, 5, 33, 0, 0, 810, 811, 5, 3, 0, 0, 811, 812, 3, 162, 81, 0, 812, 814, 5, 140, 0, 0, 813, 815, 5, 29, 0, 0, 814, 813, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 3, 164, 82, 0, 817, 818, 5, 4, 0, 0, 818, 55, 1, 0, 0, 0, 819, 831, 3, 184, 92, 0, 820, 821, 5, 3, 0, 0, 821, 826, 3, 190, 95, 0, 822, 823, 5, 5, 0, 0, 823, 825, 3, 190, 95, 0, 824, 822, 1, 0, 0, 0, 825, 828, 1, 0, 0, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 1, 0, 0, 0, 828, 826, 1, 0, 0, 0, 829, 830, 5, 4, 0, 0, 830, 832, 1, 0, 0, 0, 831, 820, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 834, 5, 33, 0, 0, 834, 835, 5, 3, 0, 0, 835, 836, 3, 84, 42, 0, 836, 837, 5, 4, 0, 0, 837, 57, 1, 0, 0, 0, 838, 847, 5, 124, 0, 0, 839, 848, 5, 7, 0, 0, 840, 845, 3, 68, 34, 0, 841, 843, 5, 33, 0, 0, 842, 841, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 846, 3, 172, 86, 0, 845, 842, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 839, 1, 0, 0, 0, 847, 840, 1, 0, 0, 0, 848, 862, 1, 0, 0, 0, 849, 858, 5, 5, 0, 0, 850, 859, 5, 7, 0, 0, 851, 856, 3, 68, 34, 0, 852, 854, 5, 33, 0, 0, 853, 852, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854, 855, 1, 0, 0, 0, 855, 857, 3, 172, 86, 0, 856, 853, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 850, 1, 0, 0, 0, 858, 851, 1, 0, 0, 0, 859, 861, 1, 0, 0, 0, 860, 849, 1, 0, 0, 0, 861, 864, 1, 0, 0, 0, 862, 860, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, 59, 1, 0, 0, 0, 864, 862, 1, 0, 0, 0, 865, 867, 3, 50, 25, 0, 866, 865, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 869, 5, 59, 0, 0, 869, 870, 5, 75, 0, 0, 870, 873, 3, 112, 56, 0, 871, 872, 5, 149, 0, 0, 872, 874, 3, 68, 34, 0, 873, 871, 1, 0, 0, 0, 873, 874, 1, 0, 0, 0, 874, 876, 1, 0, 0, 0, 875, 877, 3, 58, 29, 0, 876, 875, 1, 0, 0, 0, 876, 877, 1, 0, 0, 0, 877, 61, 1, 0, 0, 0, 878, 880, 3, 50, 25, 0, 879, 878, 1, 0, 0, 0, 879, 880, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, 5, 59, 0, 0, 882, 883, 5, 75, 0, 0, 883, 886, 3, 112, 56, 0, 884, 885, 5, 149, 0, 0, 885, 887, 3, 68, 34, 0, 886, 884, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 892, 1, 0, 0, 0, 888, 890, 3, 134, 67, 0, 889, 888, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 893, 3, 136, 68, 0, 892, 889, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, 896, 3, 58, 29, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 63, 1, 0, 0, 0, 897, 899, 5, 61, 0, 0, 898, 900, 5, 55, 0, 0, 899, 898, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, 901, 902, 3, 182, 91, 0, 902, 65, 1, 0, 0, 0, 903, 904, 5, 63, 0, 0, 904, 907, 7, 9, 0, 0, 905, 906, 5, 80, 0, 0, 906, 908, 5, 70, 0, 0, 907, 905, 1, 0, 0, 0, 907, 908, 1, 0, 0, 0, 908, 912, 1, 0, 0, 0, 909, 910, 3, 182, 91, 0, 910, 911, 5, 2, 0, 0, 911, 913, 1, 0, 0, 0, 912, 909, 1, 0, 0, 0, 912, 913, 1, 0, 0, 0, 913, 914, 1, 0, 0, 0, 914, 915, 3, 228, 114, 0, 915, 67, 1, 0, 0, 0, 916, 917, 6, 34, -1, 0, 917, 1006, 3, 72, 36, 0, 918, 1006, 5, 188, 0, 0, 919, 1006, 5, 189, 0, 0, 920, 921, 3, 182, 91, 0, 921, 922, 5, 2, 0, 0, 922, 924, 1, 0, 0, 0, 923, 920, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, 924, 925, 1, 0, 0, 0, 925, 926, 3, 184, 92, 0, 926, 927, 5, 2, 0, 0, 927, 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 930, 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931, 932, 3, 166, 83, 0, 932, 933, 3, 68, 34, 20, 933, 1006, 1, 0, 0, 0, 934, 935, 3, 180, 90, 0, 935, 948, 5, 3, 0, 0, 936, 938, 5, 62, 0, 0, 937, 936, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68, 34, 0, 940, 941, 5, 5, 0, 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0, 0, 943, 946, 1, 0, 0, 0, 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 949, 1, 0, 0, 0, 946, 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937, 1, 0, 0, 0, 948, 947, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, 5, 4, 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0, 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957, 958, 5, 3, 0, 0, 958, 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962, 3, 68, 34, 0, 961, 959, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, 1, 0, 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 5, 4, 0, 0, 967, 1006, 1, 0, 0, 0, 968, 969, 5, 43, 0, 0, 969, 970, 5, 3, 0, 0, 970, 971, 3, 68, 34, 0, 971, 972, 5, 33, 0, 0, 972, 973, 3, 32, 16, 0, 973, 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977, 5, 102, 0, 0, 976, 975, 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 980, 5, 70, 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0, 983, 984, 5, 4, 0, 0, 984, 1006, 1, 0, 0, 0, 985, 987, 5, 42, 0, 0, 986, 988, 3, 68, 34, 0, 987, 986, 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994, 1, 0, 0, 0, 989, 990, 5, 148, 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5, 136, 0, 0, 992, 993, 3, 68, 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 1000, 1, 0, 0, 0, 998, 999, 5, 65, 0, 0, 999, 1001, 3, 68, 34, 0, 1000, 998, 1, 0, 0, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 1003, 5, 66, 0, 0, 1003, 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35, 0, 1005, 916, 1, 0, 0, 0, 1005, 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0, 1005, 928, 1, 0, 0, 0, 1005, 931, 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005, 957, 1, 0, 0, 0, 1005, 968, 1, 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985, 1, 0, 0, 0, 1005, 1004, 1, 0, 0, 0, 1006, 1123, 1, 0, 0, 0, 1007, 1008, 10, 19, 0, 0, 1008, 1009, 5, 11, 0, 0, 1009, 1122, 3, 68, 34, 20, 1010, 1011, 10, 18, 0, 0, 1011, 1012, 7, 10, 0, 0, 1012, 1122, 3, 68, 34, 19, 1013, 1014, 10, 17, 0, 0, 1014, 1015, 7, 4, 0, 0, 1015, 1122, 3, 68, 34, 18, 1016, 1017, 10, 16, 0, 0, 1017, 1018, 7, 11, 0, 0, 1018, 1122, 3, 68, 34, 17, 1019, 1020, 10, 15, 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1122, 3, 68, 34, 16, 1022, 1038, 10, 14, 0, 0, 1023, 1039, 5, 6, 0, 0, 1024, 1039, 5, 22, 0, 0, 1025, 1039, 5, 23, 0, 0, 1026, 1039, 5, 24, 0, 0, 1027, 1039, 5, 92, 0, 0, 1028, 1029, 5, 92, 0, 0, 1029, 1039, 5, 102, 0, 0, 1030, 1032, 5, 102, 0, 0, 1031, 1030, 1, 0, 0, 0, 1031, 1032, 1, 0, 0, 0, 1032, 1033, 1, 0, 0, 0, 1033, 1039, 5, 83, 0, 0, 1034, 1039, 5, 97, 0, 0, 1035, 1039, 5, 77, 0, 0, 1036, 1039, 5, 99, 0, 0, 1037, 1039, 5, 118, 0, 0, 1038, 1023, 1, 0, 0, 0, 1038, 1024, 1, 0, 0, 0, 1038, 1025, 1, 0, 0, 0, 1038, 1026, 1, 0, 0, 0, 1038, 1027, 1, 0, 0, 0, 1038, 1028, 1, 0, 0, 0, 1038, 1031, 1, 0, 0, 0, 1038, 1034, 1, 0, 0, 0, 1038, 1035, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1037, 1, 0, 0, 0, 1039, 1040, 1, 0, 0, 0, 1040, 1122, 3, 68, 34, 15, 1041, 1042, 10, 12, 0, 0, 1042, 1043, 5, 32, 0, 0, 1043, 1122, 3, 68, 34, 13, 1044, 1045, 10, 11, 0, 0, 1045, 1046, 5, 108, 0, 0, 1046, 1122, 3, 68, 34, 12, 1047, 1049, 10, 4, 0, 0, 1048, 1050, 5, 102, 0, 0, 1049, 1048, 1, 0, 0, 0, 1049, 1050, 1, 0, 0, 0, 1050, 1051, 1, 0, 0, 0, 1051, 1052, 5, 39, 0, 0, 1052, 1053, 3, 68, 34, 0, 1053, 1054, 5, 32, 0, 0, 1054, 1055, 3, 68, 34, 5, 1055, 1122, 1, 0, 0, 0, 1056, 1058, 10, 13, 0, 0, 1057, 1059, 5, 102, 0, 0, 1058, 1057, 1, 0, 0, 0, 1058, 1059, 1, 0, 0, 0, 1059, 1060, 1, 0, 0, 0, 1060, 1099, 5, 83, 0, 0, 1061, 1071, 5, 3, 0, 0, 1062, 1072, 3, 84, 42, 0, 1063, 1068, 3, 68, 34, 0, 1064, 1065, 5, 5, 0, 0, 1065, 1067, 3, 68, 34, 0, 1066, 1064, 1, 0, 0, 0, 1067, 1070, 1, 0, 0, 0, 1068, 1066, 1, 0, 0, 0, 1068, 1069, 1, 0, 0, 0, 1069, 1072, 1, 0, 0, 0, 1070, 1068, 1, 0, 0, 0, 1071, 1062, 1, 0, 0, 0, 1071, 1063, 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1073, 1, 0, 0, 0, 1073, 1100, 5, 4, 0, 0, 1074, 1075, 3, 182, 91, 0, 1075, 1076, 5, 2, 0, 0, 1076, 1078, 1, 0, 0, 0, 1077, 1074, 1, 0, 0, 0, 1077, 1078, 1, 0, 0, 0, 1078, 1079, 1, 0, 0, 0, 1079, 1100, 3, 184, 92, 0, 1080, 1081, 3, 182, 91, 0, 1081, 1082, 5, 2, 0, 0, 1082, 1084, 1, 0, 0, 0, 1083, 1080, 1, 0, 0, 0, 1083, 1084, 1, 0, 0, 0, 1084, 1085, 1, 0, 0, 0, 1085, 1086, 3, 226, 113, 0, 1086, 1095, 5, 3, 0, 0, 1087, 1092, 3, 68, 34, 0, 1088, 1089, 5, 5, 0, 0, 1089, 1091, 3, 68, 34, 0, 1090, 1088, 1, 0, 0, 0, 1091, 1094, 1, 0, 0, 0, 1092, 1090, 1, 0, 0, 0, 1092, 1093, 1, 0, 0, 0, 1093, 1096, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1095, 1087, 1, 0, 0, 0, 1095, 1096, 1, 0, 0, 0, 1096, 1097, 1, 0, 0, 0, 1097, 1098, 5, 4, 0, 0, 1098, 1100, 1, 0, 0, 0, 1099, 1061, 1, 0, 0, 0, 1099, 1077, 1, 0, 0, 0, 1099, 1083, 1, 0, 0, 0, 1100, 1122, 1, 0, 0, 0, 1101, 1102, 10, 7, 0, 0, 1102, 1103, 5, 45, 0, 0, 1103, 1122, 3, 192, 96, 0, 1104, 1106, 10, 6, 0, 0, 1105, 1107, 5, 102, 0, 0, 1106, 1105, 1, 0, 0, 0, 1106, 1107, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1109, 7, 13, 0, 0, 1109, 1112, 3, 68, 34, 0, 1110, 1111, 5, 67, 0, 0, 1111, 1113, 3, 68, 34, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1122, 1, 0, 0, 0, 1114, 1119, 10, 5, 0, 0, 1115, 1120, 5, 93, 0, 0, 1116, 1120, 5, 103, 0, 0, 1117, 1118, 5, 102, 0, 0, 1118, 1120, 5, 104, 0, 0, 1119, 1115, 1, 0, 0, 0, 1119, 1116, 1, 0, 0, 0, 1119, 1117, 1, 0, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1007, 1, 0, 0, 0, 1121, 1010, 1, 0, 0, 0, 1121, 1013, 1, 0, 0, 0, 1121, 1016, 1, 0, 0, 0, 1121, 1019, 1, 0, 0, 0, 1121, 1022, 1, 0, 0, 0, 1121, 1041, 1, 0, 0, 0, 1121, 1044, 1, 0, 0, 0, 1121, 1047, 1, 0, 0, 0, 1121, 1056, 1, 0, 0, 0, 1121, 1101, 1, 0, 0, 0, 1121, 1104, 1, 0, 0, 0, 1121, 1114, 1, 0, 0, 0, 1122, 1125, 1, 0, 0, 0, 1123, 1121, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 69, 1, 0, 0, 0, 1125, 1123, 1, 0, 0, 0, 1126, 1127, 5, 115, 0, 0, 1127, 1132, 5, 3, 0, 0, 1128, 1133, 5, 81, 0, 0, 1129, 1130, 7, 14, 0, 0, 1130, 1131, 5, 5, 0, 0, 1131, 1133, 3, 168, 84, 0, 1132, 1128, 1, 0, 0, 0, 1132, 1129, 1, 0, 0, 0, 1133, 1134, 1, 0, 0, 0, 1134, 1135, 5, 4, 0, 0, 1135, 71, 1, 0, 0, 0, 1136, 1137, 7, 15, 0, 0, 1137, 73, 1, 0, 0, 0, 1138, 1140, 3, 50, 25, 0, 1139, 1138, 1, 0, 0, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1146, 1, 0, 0, 0, 1141, 1147, 5, 88, 0, 0, 1142, 1147, 5, 122, 0, 0, 1143, 1144, 5, 88, 0, 0, 1144, 1145, 5, 108, 0, 0, 1145, 1147, 7, 8, 0, 0, 1146, 1141, 1, 0, 0, 0, 1146, 1142, 1, 0, 0, 0, 1146, 1143, 1, 0, 0, 0, 1147, 1148, 1, 0, 0, 0, 1148, 1152, 5, 91, 0, 0, 1149, 1150, 3, 182, 91, 0, 1150, 1151, 5, 2, 0, 0, 1151, 1153, 1, 0, 0, 0, 1152, 1149, 1, 0, 0, 0, 1152, 1153, 1, 0, 0, 0, 1153, 1154, 1, 0, 0, 0, 1154, 1157, 3, 184, 92, 0, 1155, 1156, 5, 33, 0, 0, 1156, 1158, 3, 208, 104, 0, 1157, 1155, 1, 0, 0, 0, 1157, 1158, 1, 0, 0, 0, 1158, 1170, 1, 0, 0, 0, 1159, 1160, 5, 3, 0, 0, 1160, 1165, 3, 190, 95, 0, 1161, 1162, 5, 5, 0, 0, 1162, 1164, 3, 190, 95, 0, 1163, 1161, 1, 0, 0, 0, 1164, 1167, 1, 0, 0, 0, 1165, 1163, 1, 0, 0, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1168, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, 1168, 1169, 5, 4, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1159, 1, 0, 0, 0, 1170, 1171, 1, 0, 0, 0, 1171, 1201, 1, 0, 0, 0, 1172, 1173, 5, 145, 0, 0, 1173, 1174, 5, 3, 0, 0, 1174, 1179, 3, 68, 34, 0, 1175, 1176, 5, 5, 0, 0, 1176, 1178, 3, 68, 34, 0, 1177, 1175, 1, 0, 0, 0, 1178, 1181, 1, 0, 0, 0, 1179, 1177, 1, 0, 0, 0, 1179, 1180, 1, 0, 0, 0, 1180, 1182, 1, 0, 0, 0, 1181, 1179, 1, 0, 0, 0, 1182, 1197, 5, 4, 0, 0, 1183, 1184, 5, 5, 0, 0, 1184, 1185, 5, 3, 0, 0, 1185, 1190, 3, 68, 34, 0, 1186, 1187, 5, 5, 0, 0, 1187, 1189, 3, 68, 34, 0, 1188, 1186, 1, 0, 0, 0, 1189, 1192, 1, 0, 0, 0, 1190, 1188, 1, 0, 0, 0, 1190, 1191, 1, 0, 0, 0, 1191, 1193, 1, 0, 0, 0, 1192, 1190, 1, 0, 0, 0, 1193, 1194, 5, 4, 0, 0, 1194, 1196, 1, 0, 0, 0, 1195, 1183, 1, 0, 0, 0, 1196, 1199, 1, 0, 0, 0, 1197, 1195, 1, 0, 0, 0, 1197, 1198, 1, 0, 0, 0, 1198, 1202, 1, 0, 0, 0, 1199, 1197, 1, 0, 0, 0, 1200, 1202, 3, 84, 42, 0, 1201, 1172, 1, 0, 0, 0, 1201, 1200, 1, 0, 0, 0, 1202, 1204, 1, 0, 0, 0, 1203, 1205, 3, 76, 38, 0, 1204, 1203, 1, 0, 0, 0, 1204, 1205, 1, 0, 0, 0, 1205, 1207, 1, 0, 0, 0, 1206, 1208, 3, 58, 29, 0, 1207, 1206, 1, 0, 0, 0, 1207, 1208, 1, 0, 0, 0, 1208, 1212, 1, 0, 0, 0, 1209, 1210, 5, 56, 0, 0, 1210, 1212, 5, 145, 0, 0, 1211, 1139, 1, 0, 0, 0, 1211, 1209, 1, 0, 0, 0, 1212, 75, 1, 0, 0, 0, 1213, 1214, 5, 107, 0, 0, 1214, 1229, 5, 48, 0, 0, 1215, 1216, 5, 3, 0, 0, 1216, 1221, 3, 24, 12, 0, 1217, 1218, 5, 5, 0, 0, 1218, 1220, 3, 24, 12, 0, 1219, 1217, 1, 0, 0, 0, 1220, 1223, 1, 0, 0, 0, 1221, 1219, 1, 0, 0, 0, 1221, 1222, 1, 0, 0, 0, 1222, 1224, 1, 0, 0, 0, 1223, 1221, 1, 0, 0, 0, 1224, 1227, 5, 4, 0, 0, 1225, 1226, 5, 149, 0, 0, 1226, 1228, 3, 68, 34, 0, 1227, 1225, 1, 0, 0, 0, 1227, 1228, 1, 0, 0, 0, 1228, 1230, 1, 0, 0, 0, 1229, 1215, 1, 0, 0, 0, 1229, 1230, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1258, 5, 184, 0, 0, 1232, 1259, 5, 185, 0, 0, 1233, 1234, 5, 142, 0, 0, 1234, 1237, 5, 131, 0, 0, 1235, 1238, 3, 190, 95, 0, 1236, 1238, 3, 108, 54, 0, 1237, 1235, 1, 0, 0, 0, 1237, 1236, 1, 0, 0, 0, 1238, 1239, 1, 0, 0, 0, 1239, 1240, 5, 6, 0, 0, 1240, 1251, 3, 68, 34, 0, 1241, 1244, 5, 5, 0, 0, 1242, 1245, 3, 190, 95, 0, 1243, 1245, 3, 108, 54, 0, 1244, 1242, 1, 0, 0, 0, 1244, 1243, 1, 0, 0, 0, 1245, 1246, 1, 0, 0, 0, 1246, 1247, 5, 6, 0, 0, 1247, 1248, 3, 68, 34, 0, 1248, 1250, 1, 0, 0, 0, 1249, 1241, 1, 0, 0, 0, 1250, 1253, 1, 0, 0, 0, 1251, 1249, 1, 0, 0, 0, 1251, 1252, 1, 0, 0, 0, 1252, 1256, 1, 0, 0, 0, 1253, 1251, 1, 0, 0, 0, 1254, 1255, 5, 149, 0, 0, 1255, 1257, 3, 68, 34, 0, 1256, 1254, 1, 0, 0, 0, 1256, 1257, 1, 0, 0, 0, 1257, 1259, 1, 0, 0, 0, 1258, 1232, 1, 0, 0, 0, 1258, 1233, 1, 0, 0, 0, 1259, 77, 1, 0, 0, 0, 1260, 1264, 5, 112, 0, 0, 1261, 1262, 3, 182, 91, 0, 1262, 1263, 5, 2, 0, 0, 1263, 1265, 1, 0, 0, 0, 1264, 1261, 1, 0, 0, 0, 1264, 1265, 1, 0, 0, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1273, 3, 204, 102, 0, 1267, 1268, 5, 6, 0, 0, 1268, 1274, 3, 80, 40, 0, 1269, 1270, 5, 3, 0, 0, 1270, 1271, 3, 80, 40, 0, 1271, 1272, 5, 4, 0, 0, 1272, 1274, 1, 0, 0, 0, 1273, 1267, 1, 0, 0, 0, 1273, 1269, 1, 0, 0, 0, 1273, 1274, 1, 0, 0, 0, 1274, 79, 1, 0, 0, 0, 1275, 1279, 3, 36, 18, 0, 1276, 1279, 3, 176, 88, 0, 1277, 1279, 5, 190, 0, 0, 1278, 1275, 1, 0, 0, 0, 1278, 1276, 1, 0, 0, 0, 1278, 1277, 1, 0, 0, 0, 1279, 81, 1, 0, 0, 0, 1280, 1291, 5, 119, 0, 0, 1281, 1292, 3, 192, 96, 0, 1282, 1283, 3, 182, 91, 0, 1283, 1284, 5, 2, 0, 0, 1284, 1286, 1, 0, 0, 0, 1285, 1282, 1, 0, 0, 0, 1285, 1286, 1, 0, 0, 0, 1286, 1289, 1, 0, 0, 0, 1287, 1290, 3, 184, 92, 0, 1288, 1290, 3, 196, 98, 0, 1289, 1287, 1, 0, 0, 0, 1289, 1288, 1, 0, 0, 0, 1290, 1292, 1, 0, 0, 0, 1291, 1281, 1, 0, 0, 0, 1291, 1285, 1, 0, 0, 0, 1291, 1292, 1, 0, 0, 0, 1292, 83, 1, 0, 0, 0, 1293, 1295, 3, 132, 66, 0, 1294, 1293, 1, 0, 0, 0, 1294, 1295, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 1302, 3, 88, 44, 0, 1297, 1298, 3, 104, 52, 0, 1298, 1299, 3, 88, 44, 0, 1299, 1301, 1, 0, 0, 0, 1300, 1297, 1, 0, 0, 0, 1301, 1304, 1, 0, 0, 0, 1302, 1300, 1, 0, 0, 0, 1302, 1303, 1, 0, 0, 0, 1303, 1306, 1, 0, 0, 0, 1304, 1302, 1, 0, 0, 0, 1305, 1307, 3, 134, 67, 0, 1306, 1305, 1, 0, 0, 0, 1306, 1307, 1, 0, 0, 0, 1307, 1309, 1, 0, 0, 0, 1308, 1310, 3, 136, 68, 0, 1309, 1308, 1, 0, 0, 0, 1309, 1310, 1, 0, 0, 0, 1310, 85, 1, 0, 0, 0, 1311, 1318, 3, 96, 48, 0, 1312, 1313, 3, 100, 50, 0, 1313, 1314, 3, 96, 48, 0, 1314, 1315, 3, 102, 51, 0, 1315, 1317, 1, 0, 0, 0, 1316, 1312, 1, 0, 0, 0, 1317, 1320, 1, 0, 0, 0, 1318, 1316, 1, 0, 0, 0, 1318, 1319, 1, 0, 0, 0, 1319, 87, 1, 0, 0, 0, 1320, 1318, 1, 0, 0, 0, 1321, 1323, 5, 130, 0, 0, 1322, 1324, 7, 16, 0, 0, 1323, 1322, 1, 0, 0, 0, 1323, 1324, 1, 0, 0, 0, 1324, 1325, 1, 0, 0, 0, 1325, 1330, 3, 98, 49, 0, 1326, 1327, 5, 5, 0, 0, 1327, 1329, 3, 98, 49, 0, 1328, 1326, 1, 0, 0, 0, 1329, 1332, 1, 0, 0, 0, 1330, 1328, 1, 0, 0, 0, 1330, 1331, 1, 0, 0, 0, 1331, 1345, 1, 0, 0, 0, 1332, 1330, 1, 0, 0, 0, 1333, 1343, 5, 75, 0, 0, 1334, 1339, 3, 96, 48, 0, 1335, 1336, 5, 5, 0, 0, 1336, 1338, 3, 96, 48, 0, 1337, 1335, 1, 0, 0, 0, 1338, 1341, 1, 0, 0, 0, 1339, 1337, 1, 0, 0, 0, 1339, 1340, 1, 0, 0, 0, 1340, 1344, 1, 0, 0, 0, 1341, 1339, 1, 0, 0, 0, 1342, 1344, 3, 86, 43, 0, 1343, 1334, 1, 0, 0, 0, 1343, 1342, 1, 0, 0, 0, 1344, 1346, 1, 0, 0, 0, 1345, 1333, 1, 0, 0, 0, 1345, 1346, 1, 0, 0, 0, 1346, 1349, 1, 0, 0, 0, 1347, 1348, 5, 149, 0, 0, 1348, 1350, 3, 68, 34, 0, 1349, 1347, 1, 0, 0, 0, 1349, 1350, 1, 0, 0, 0, 1350, 1365, 1, 0, 0, 0, 1351, 1352, 5, 78, 0, 0, 1352, 1353, 5, 40, 0, 0, 1353, 1358, 3, 68, 34, 0, 1354, 1355, 5, 5, 0, 0, 1355, 1357, 3, 68, 34, 0, 1356, 1354, 1, 0, 0, 0, 1357, 1360, 1, 0, 0, 0, 1358, 1356, 1, 0, 0, 0, 1358, 1359, 1, 0, 0, 0, 1359, 1363, 1, 0, 0, 0, 1360, 1358, 1, 0, 0, 0, 1361, 1362, 5, 79, 0, 0, 1362, 1364, 3, 68, 34, 0, 1363, 1361, 1, 0, 0, 0, 1363, 1364, 1, 0, 0, 0, 1364, 1366, 1, 0, 0, 0, 1365, 1351, 1, 0, 0, 0, 1365, 1366, 1, 0, 0, 0, 1366, 1381, 1, 0, 0, 0, 1367, 1368, 5, 175, 0, 0, 1368, 1369, 3, 214, 107, 0, 1369, 1370, 5, 33, 0, 0, 1370, 1378, 3, 118, 59, 0, 1371, 1372, 5, 5, 0, 0, 1372, 1373, 3, 214, 107, 0, 1373, 1374, 5, 33, 0, 0, 1374, 1375, 3, 118, 59, 0, 1375, 1377, 1, 0, 0, 0, 1376, 1371, 1, 0, 0, 0, 1377, 1380, 1, 0, 0, 0, 1378, 1376, 1, 0, 0, 0, 1378, 1379, 1, 0, 0, 0, 1379, 1382, 1, 0, 0, 0, 1380, 1378, 1, 0, 0, 0, 1381, 1367, 1, 0, 0, 0, 1381, 1382, 1, 0, 0, 0, 1382, 1412, 1, 0, 0, 0, 1383, 1384, 5, 145, 0, 0, 1384, 1385, 5, 3, 0, 0, 1385, 1390, 3, 68, 34, 0, 1386, 1387, 5, 5, 0, 0, 1387, 1389, 3, 68, 34, 0, 1388, 1386, 1, 0, 0, 0, 1389, 1392, 1, 0, 0, 0, 1390, 1388, 1, 0, 0, 0, 1390, 1391, 1, 0, 0, 0, 1391, 1393, 1, 0, 0, 0, 1392, 1390, 1, 0, 0, 0, 1393, 1408, 5, 4, 0, 0, 1394, 1395, 5, 5, 0, 0, 1395, 1396, 5, 3, 0, 0, 1396, 1401, 3, 68, 34, 0, 1397, 1398, 5, 5, 0, 0, 1398, 1400, 3, 68, 34, 0, 1399, 1397, 1, 0, 0, 0, 1400, 1403, 1, 0, 0, 0, 1401, 1399, 1, 0, 0, 0, 1401, 1402, 1, 0, 0, 0, 1402, 1404, 1, 0, 0, 0, 1403, 1401, 1, 0, 0, 0, 1404, 1405, 5, 4, 0, 0, 1405, 1407, 1, 0, 0, 0, 1406, 1394, 1, 0, 0, 0, 1407, 1410, 1, 0, 0, 0, 1408, 1406, 1, 0, 0, 0, 1408, 1409, 1, 0, 0, 0, 1409, 1412, 1, 0, 0, 0, 1410, 1408, 1, 0, 0, 0, 1411, 1321, 1, 0, 0, 0, 1411, 1383, 1, 0, 0, 0, 1412, 89, 1, 0, 0, 0, 1413, 1414, 3, 84, 42, 0, 1414, 91, 1, 0, 0, 0, 1415, 1417, 3, 132, 66, 0, 1416, 1415, 1, 0, 0, 0, 1416, 1417, 1, 0, 0, 0, 1417, 1418, 1, 0, 0, 0, 1418, 1420, 3, 88, 44, 0, 1419, 1421, 3, 134, 67, 0, 1420, 1419, 1, 0, 0, 0, 1420, 1421, 1, 0, 0, 0, 1421, 1423, 1, 0, 0, 0, 1422, 1424, 3, 136, 68, 0, 1423, 1422, 1, 0, 0, 0, 1423, 1424, 1, 0, 0, 0, 1424, 93, 1, 0, 0, 0, 1425, 1427, 3, 132, 66, 0, 1426, 1425, 1, 0, 0, 0, 1426, 1427, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 1438, 3, 88, 44, 0, 1429, 1431, 5, 140, 0, 0, 1430, 1432, 5, 29, 0, 0, 1431, 1430, 1, 0, 0, 0, 1431, 1432, 1, 0, 0, 0, 1432, 1436, 1, 0, 0, 0, 1433, 1436, 5, 90, 0, 0, 1434, 1436, 5, 68, 0, 0, 1435, 1429, 1, 0, 0, 0, 1435, 1433, 1, 0, 0, 0, 1435, 1434, 1, 0, 0, 0, 1436, 1437, 1, 0, 0, 0, 1437, 1439, 3, 88, 44, 0, 1438, 1435, 1, 0, 0, 0, 1439, 1440, 1, 0, 0, 0, 1440, 1438, 1, 0, 0, 0, 1440, 1441, 1, 0, 0, 0, 1441, 1443, 1, 0, 0, 0, 1442, 1444, 3, 134, 67, 0, 1443, 1442, 1, 0, 0, 0, 1443, 1444, 1, 0, 0, 0, 1444, 1446, 1, 0, 0, 0, 1445, 1447, 3, 136, 68, 0, 1446, 1445, 1, 0, 0, 0, 1446, 1447, 1, 0, 0, 0, 1447, 95, 1, 0, 0, 0, 1448, 1449, 3, 182, 91, 0, 1449, 1450, 5, 2, 0, 0, 1450, 1452, 1, 0, 0, 0, 1451, 1448, 1, 0, 0, 0, 1451, 1452, 1, 0, 0, 0, 1452, 1453, 1, 0, 0, 0, 1453, 1458, 3, 184, 92, 0, 1454, 1456, 5, 33, 0, 0, 1455, 1454, 1, 0, 0, 0, 1455, 1456, 1, 0, 0, 0, 1456, 1457, 1, 0, 0, 0, 1457, 1459, 3, 208, 104, 0, 1458, 1455, 1, 0, 0, 0, 1458, 1459, 1, 0, 0, 0, 1459, 1465, 1, 0, 0, 0, 1460, 1461, 5, 85, 0, 0, 1461, 1462, 5, 40, 0, 0, 1462, 1466, 3, 196, 98, 0, 1463, 1464, 5, 102, 0, 0, 1464, 1466, 5, 85, 0, 0, 1465, 1460, 1, 0, 0, 0, 1465, 1463, 1, 0, 0, 0, 1465, 1466, 1, 0, 0, 0, 1466, 1577, 1, 0, 0, 0, 1467, 1468, 3, 182, 91, 0, 1468, 1469, 5, 2, 0, 0, 1469, 1471, 1, 0, 0, 0, 1470, 1467, 1, 0, 0, 0, 1470, 1471, 1, 0, 0, 0, 1471, 1472, 1, 0, 0, 0, 1472, 1473, 3, 226, 113, 0, 1473, 1474, 5, 3, 0, 0, 1474, 1479, 3, 68, 34, 0, 1475, 1476, 5, 5, 0, 0, 1476, 1478, 3, 68, 34, 0, 1477, 1475, 1, 0, 0, 0, 1478, 1481, 1, 0, 0, 0, 1479, 1477, 1, 0, 0, 0, 1479, 1480, 1, 0, 0, 0, 1480, 1482, 1, 0, 0, 0, 1481, 1479, 1, 0, 0, 0, 1482, 1487, 5, 4, 0, 0, 1483, 1485, 5, 33, 0, 0, 1484, 1483, 1, 0, 0, 0, 1484, 1485, 1, 0, 0, 0, 1485, 1486, 1, 0, 0, 0, 1486, 1488, 3, 208, 104, 0, 1487, 1484, 1, 0, 0, 0, 1487, 1488, 1, 0, 0, 0, 1488, 1577, 1, 0, 0, 0, 1489, 1499, 5, 3, 0, 0, 1490, 1495, 3, 96, 48, 0, 1491, 1492, 5, 5, 0, 0, 1492, 1494, 3, 96, 48, 0, 1493, 1491, 1, 0, 0, 0, 1494, 1497, 1, 0, 0, 0, 1495, 1493, 1, 0, 0, 0, 1495, 1496, 1, 0, 0, 0, 1496, 1500, 1, 0, 0, 0, 1497, 1495, 1, 0, 0, 0, 1498, 1500, 3, 86, 43, 0, 1499, 1490, 1, 0, 0, 0, 1499, 1498, 1, 0, 0, 0, 1500, 1501, 1, 0, 0, 0, 1501, 1502, 5, 4, 0, 0, 1502, 1577, 1, 0, 0, 0, 1503, 1504, 5, 3, 0, 0, 1504, 1505, 3, 84, 42, 0, 1505, 1510, 5, 4, 0, 0, 1506, 1508, 5, 33, 0, 0, 1507, 1506, 1, 0, 0, 0, 1507, 1508, 1, 0, 0, 0, 1508, 1509, 1, 0, 0, 0, 1509, 1511, 3, 208, 104, 0, 1510, 1507, 1, 0, 0, 0, 1510, 1511, 1, 0, 0, 0, 1511, 1577, 1, 0, 0, 0, 1512, 1513, 3, 182, 91, 0, 1513, 1514, 5, 2, 0, 0, 1514, 1516, 1, 0, 0, 0, 1515, 1512, 1, 0, 0, 0, 1515, 1516, 1, 0, 0, 0, 1516, 1517, 1, 0, 0, 0, 1517, 1522, 3, 184, 92, 0, 1518, 1520, 5, 33, 0, 0, 1519, 1518, 1, 0, 0, 0, 1519, 1520, 1, 0, 0, 0, 1520, 1521, 1, 0, 0, 0, 1521, 1523, 3, 210, 105, 0, 1522, 1519, 1, 0, 0, 0, 1522, 1523, 1, 0, 0, 0, 1523, 1529, 1, 0, 0, 0, 1524, 1525, 5, 85, 0, 0, 1525, 1526, 5, 40, 0, 0, 1526, 1530, 3, 196, 98, 0, 1527, 1528, 5, 102, 0, 0, 1528, 1530, 5, 85, 0, 0, 1529, 1524, 1, 0, 0, 0, 1529, 1527, 1, 0, 0, 0, 1529, 1530, 1, 0, 0, 0, 1530, 1577, 1, 0, 0, 0, 1531, 1532, 3, 182, 91, 0, 1532, 1533, 5, 2, 0, 0, 1533, 1535, 1, 0, 0, 0, 1534, 1531, 1, 0, 0, 0, 1534, 1535, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, 1537, 3, 226, 113, 0, 1537, 1538, 5, 3, 0, 0, 1538, 1543, 3, 68, 34, 0, 1539, 1540, 5, 5, 0, 0, 1540, 1542, 3, 68, 34, 0, 1541, 1539, 1, 0, 0, 0, 1542, 1545, 1, 0, 0, 0, 1543, 1541, 1, 0, 0, 0, 1543, 1544, 1, 0, 0, 0, 1544, 1546, 1, 0, 0, 0, 1545, 1543, 1, 0, 0, 0, 1546, 1551, 5, 4, 0, 0, 1547, 1549, 5, 33, 0, 0, 1548, 1547, 1, 0, 0, 0, 1548, 1549, 1, 0, 0, 0, 1549, 1550, 1, 0, 0, 0, 1550, 1552, 3, 210, 105, 0, 1551, 1548, 1, 0, 0, 0, 1551, 1552, 1, 0, 0, 0, 1552, 1577, 1, 0, 0, 0, 1553, 1563, 5, 3, 0, 0, 1554, 1559, 3, 96, 48, 0, 1555, 1556, 5, 5, 0, 0, 1556, 1558, 3, 96, 48, 0, 1557, 1555, 1, 0, 0, 0, 1558, 1561, 1, 0, 0, 0, 1559, 1557, 1, 0, 0, 0, 1559, 1560, 1, 0, 0, 0, 1560, 1564, 1, 0, 0, 0, 1561, 1559, 1, 0, 0, 0, 1562, 1564, 3, 86, 43, 0, 1563, 1554, 1, 0, 0, 0, 1563, 1562, 1, 0, 0, 0, 1564, 1565, 1, 0, 0, 0, 1565, 1566, 5, 4, 0, 0, 1566, 1577, 1, 0, 0, 0, 1567, 1568, 5, 3, 0, 0, 1568, 1569, 3, 84, 42, 0, 1569, 1574, 5, 4, 0, 0, 1570, 1572, 5, 33, 0, 0, 1571, 1570, 1, 0, 0, 0, 1571, 1572, 1, 0, 0, 0, 1572, 1573, 1, 0, 0, 0, 1573, 1575, 3, 210, 105, 0, 1574, 1571, 1, 0, 0, 0, 1574, 1575, 1, 0, 0, 0, 1575, 1577, 1, 0, 0, 0, 1576, 1451, 1, 0, 0, 0, 1576, 1470, 1, 0, 0, 0, 1576, 1489, 1, 0, 0, 0, 1576, 1503, 1, 0, 0, 0, 1576, 1515, 1, 0, 0, 0, 1576, 1534, 1, 0, 0, 0, 1576, 1553, 1, 0, 0, 0, 1576, 1567, 1, 0, 0, 0, 1577, 97, 1, 0, 0, 0, 1578, 1591, 5, 7, 0, 0, 1579, 1580, 3, 184, 92, 0, 1580, 1581, 5, 2, 0, 0, 1581, 1582, 5, 7, 0, 0, 1582, 1591, 1, 0, 0, 0, 1583, 1588, 3, 68, 34, 0, 1584, 1586, 5, 33, 0, 0, 1585, 1584, 1, 0, 0, 0, 1585, 1586, 1, 0, 0, 0, 1586, 1587, 1, 0, 0, 0, 1587, 1589, 3, 172, 86, 0, 1588, 1585, 1, 0, 0, 0, 1588, 1589, 1, 0, 0, 0, 1589, 1591, 1, 0, 0, 0, 1590, 1578, 1, 0, 0, 0, 1590, 1579, 1, 0, 0, 0, 1590, 1583, 1, 0, 0, 0, 1591, 99, 1, 0, 0, 0, 1592, 1607, 5, 5, 0, 0, 1593, 1595, 5, 100, 0, 0, 1594, 1593, 1, 0, 0, 0, 1594, 1595, 1, 0, 0, 0, 1595, 1601, 1, 0, 0, 0, 1596, 1598, 7, 17, 0, 0, 1597, 1599, 5, 110, 0, 0, 1598, 1597, 1, 0, 0, 0, 1598, 1599, 1, 0, 0, 0, 1599, 1602, 1, 0, 0, 0, 1600, 1602, 5, 87, 0, 0, 1601, 1596, 1, 0, 0, 0, 1601, 1600, 1, 0, 0, 0, 1601, 1602, 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1607, 5, 94, 0, 0, 1604, 1605, 5, 51, 0, 0, 1605, 1607, 5, 94, 0, 0, 1606, 1592, 1, 0, 0, 0, 1606, 1594, 1, 0, 0, 0, 1606, 1604, 1, 0, 0, 0, 1607, 101, 1, 0, 0, 0, 1608, 1609, 5, 107, 0, 0, 1609, 1623, 3, 68, 34, 0, 1610, 1611, 5, 143, 0, 0, 1611, 1612, 5, 3, 0, 0, 1612, 1617, 3, 190, 95, 0, 1613, 1614, 5, 5, 0, 0, 1614, 1616, 3, 190, 95, 0, 1615, 1613, 1, 0, 0, 0, 1616, 1619, 1, 0, 0, 0, 1617, 1615, 1, 0, 0, 0, 1617, 1618, 1, 0, 0, 0, 1618, 1620, 1, 0, 0, 0, 1619, 1617, 1, 0, 0, 0, 1620, 1621, 5, 4, 0, 0, 1621, 1623, 1, 0, 0, 0, 1622, 1608, 1, 0, 0, 0, 1622, 1610, 1, 0, 0, 0, 1622, 1623, 1, 0, 0, 0, 1623, 103, 1, 0, 0, 0, 1624, 1626, 5, 140, 0, 0, 1625, 1627, 5, 29, 0, 0, 1626, 1625, 1, 0, 0, 0, 1626, 1627, 1, 0, 0, 0, 1627, 1631, 1, 0, 0, 0, 1628, 1631, 5, 90, 0, 0, 1629, 1631, 5, 68, 0, 0, 1630, 1624, 1, 0, 0, 0, 1630, 1628, 1, 0, 0, 0, 1630, 1629, 1, 0, 0, 0, 1631, 105, 1, 0, 0, 0, 1632, 1634, 3, 50, 25, 0, 1633, 1632, 1, 0, 0, 0, 1633, 1634, 1, 0, 0, 0, 1634, 1635, 1, 0, 0, 0, 1635, 1638, 5, 142, 0, 0, 1636, 1637, 5, 108, 0, 0, 1637, 1639, 7, 8, 0, 0, 1638, 1636, 1, 0, 0, 0, 1638, 1639, 1, 0, 0, 0, 1639, 1640, 1, 0, 0, 0, 1640, 1641, 3, 112, 56, 0, 1641, 1644, 5, 131, 0, 0, 1642, 1645, 3, 190, 95, 0, 1643, 1645, 3, 108, 54, 0, 1644, 1642, 1, 0, 0, 0, 1644, 1643, 1, 0, 0, 0, 1645, 1646, 1, 0, 0, 0, 1646, 1647, 5, 6, 0, 0, 1647, 1658, 3, 68, 34, 0, 1648, 1651, 5, 5, 0, 0, 1649, 1652, 3, 190, 95, 0, 1650, 1652, 3, 108, 54, 0, 1651, 1649, 1, 0, 0, 0, 1651, 1650, 1, 0, 0, 0, 1652, 1653, 1, 0, 0, 0, 1653, 1654, 5, 6, 0, 0, 1654, 1655, 3, 68, 34, 0, 1655, 1657, 1, 0, 0, 0, 1656, 1648, 1, 0, 0, 0, 1657, 1660, 1, 0, 0, 0, 1658, 1656, 1, 0, 0, 0, 1658, 1659, 1, 0, 0, 0, 1659, 1663, 1, 0, 0, 0, 1660, 1658, 1, 0, 0, 0, 1661, 1662, 5, 149, 0, 0, 1662, 1664, 3, 68, 34, 0, 1663, 1661, 1, 0, 0, 0, 1663, 1664, 1, 0, 0, 0, 1664, 1666, 1, 0, 0, 0, 1665, 1667, 3, 58, 29, 0, 1666, 1665, 1, 0, 0, 0, 1666, 1667, 1, 0, 0, 0, 1667, 107, 1, 0, 0, 0, 1668, 1669, 5, 3, 0, 0, 1669, 1674, 3, 190, 95, 0, 1670, 1671, 5, 5, 0, 0, 1671, 1673, 3, 190, 95, 0, 1672, 1670, 1, 0, 0, 0, 1673, 1676, 1, 0, 0, 0, 1674, 1672, 1, 0, 0, 0, 1674, 1675, 1, 0, 0, 0, 1675, 1677, 1, 0, 0, 0, 1676, 1674, 1, 0, 0, 0, 1677, 1678, 5, 4, 0, 0, 1678, 109, 1, 0, 0, 0, 1679, 1681, 3, 50, 25, 0, 1680, 1679, 1, 0, 0, 0, 1680, 1681, 1, 0, 0, 0, 1681, 1682, 1, 0, 0, 0, 1682, 1685, 5, 142, 0, 0, 1683, 1684, 5, 108, 0, 0, 1684, 1686, 7, 8, 0, 0, 1685, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1688, 3, 112, 56, 0, 1688, 1691, 5, 131, 0, 0, 1689, 1692, 3, 190, 95, 0, 1690, 1692, 3, 108, 54, 0, 1691, 1689, 1, 0, 0, 0, 1691, 1690, 1, 0, 0, 0, 1692, 1693, 1, 0, 0, 0, 1693, 1694, 5, 6, 0, 0, 1694, 1705, 3, 68, 34, 0, 1695, 1698, 5, 5, 0, 0, 1696, 1699, 3, 190, 95, 0, 1697, 1699, 3, 108, 54, 0, 1698, 1696, 1, 0, 0, 0, 1698, 1697, 1, 0, 0, 0, 1699, 1700, 1, 0, 0, 0, 1700, 1701, 5, 6, 0, 0, 1701, 1702, 3, 68, 34, 0, 1702, 1704, 1, 0, 0, 0, 1703, 1695, 1, 0, 0, 0, 1704, 1707, 1, 0, 0, 0, 1705, 1703, 1, 0, 0, 0, 1705, 1706, 1, 0, 0, 0, 1706, 1710, 1, 0, 0, 0, 1707, 1705, 1, 0, 0, 0, 1708, 1709, 5, 149, 0, 0, 1709, 1711, 3, 68, 34, 0, 1710, 1708, 1, 0, 0, 0, 1710, 1711, 1, 0, 0, 0, 1711, 1716, 1, 0, 0, 0, 1712, 1714, 3, 134, 67, 0, 1713, 1712, 1, 0, 0, 0, 1713, 1714, 1, 0, 0, 0, 1714, 1715, 1, 0, 0, 0, 1715, 1717, 3, 136, 68, 0, 1716, 1713, 1, 0, 0, 0, 1716, 1717, 1, 0, 0, 0, 1717, 111, 1, 0, 0, 0, 1718, 1719, 3, 182, 91, 0, 1719, 1720, 5, 2, 0, 0, 1720, 1722, 1, 0, 0, 0, 1721, 1718, 1, 0, 0, 0, 1721, 1722, 1, 0, 0, 0, 1722, 1723, 1, 0, 0, 0, 1723, 1726, 3, 184, 92, 0, 1724, 1725, 5, 33, 0, 0, 1725, 1727, 3, 216, 108, 0, 1726, 1724, 1, 0, 0, 0, 1726, 1727, 1, 0, 0, 0, 1727, 1733, 1, 0, 0, 0, 1728, 1729, 5, 85, 0, 0, 1729, 1730, 5, 40, 0, 0, 1730, 1734, 3, 196, 98, 0, 1731, 1732, 5, 102, 0, 0, 1732, 1734, 5, 85, 0, 0, 1733, 1728, 1, 0, 0, 0, 1733, 1731, 1, 0, 0, 0, 1733, 1734, 1, 0, 0, 0, 1734, 113, 1, 0, 0, 0, 1735, 1737, 5, 144, 0, 0, 1736, 1738, 3, 182, 91, 0, 1737, 1736, 1, 0, 0, 0, 1737, 1738, 1, 0, 0, 0, 1738, 1741, 1, 0, 0, 0, 1739, 1740, 5, 91, 0, 0, 1740, 1742, 3, 218, 109, 0, 1741, 1739, 1, 0, 0, 0, 1741, 1742, 1, 0, 0, 0, 1742, 115, 1, 0, 0, 0, 1743, 1744, 5, 179, 0, 0, 1744, 1745, 5, 3, 0, 0, 1745, 1746, 5, 149, 0, 0, 1746, 1747, 3, 68, 34, 0, 1747, 1748, 5, 4, 0, 0, 1748, 117, 1, 0, 0, 0, 1749, 1751, 5, 3, 0, 0, 1750, 1752, 3, 220, 110, 0, 1751, 1750, 1, 0, 0, 0, 1751, 1752, 1, 0, 0, 0, 1752, 1763, 1, 0, 0, 0, 1753, 1754, 5, 154, 0, 0, 1754, 1755, 5, 40, 0, 0, 1755, 1760, 3, 68, 34, 0, 1756, 1757, 5, 5, 0, 0, 1757, 1759, 3, 68, 34, 0, 1758, 1756, 1, 0, 0, 0, 1759, 1762, 1, 0, 0, 0, 1760, 1758, 1, 0, 0, 0, 1760, 1761, 1, 0, 0, 0, 1761, 1764, 1, 0, 0, 0, 1762, 1760, 1, 0, 0, 0, 1763, 1753, 1, 0, 0, 0, 1763, 1764, 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 5, 109, 0, 0, 1766, 1767, 5, 40, 0, 0, 1767, 1772, 3, 138, 69, 0, 1768, 1769, 5, 5, 0, 0, 1769, 1771, 3, 138, 69, 0, 1770, 1768, 1, 0, 0, 0, 1771, 1774, 1, 0, 0, 0, 1772, 1770, 1, 0, 0, 0, 1772, 1773, 1, 0, 0, 0, 1773, 1776, 1, 0, 0, 0, 1774, 1772, 1, 0, 0, 0, 1775, 1777, 3, 122, 61, 0, 1776, 1775, 1, 0, 0, 0, 1776, 1777, 1, 0, 0, 0, 1777, 1778, 1, 0, 0, 0, 1778, 1779, 5, 4, 0, 0, 1779, 119, 1, 0, 0, 0, 1780, 1814, 5, 153, 0, 0, 1781, 1815, 3, 214, 107, 0, 1782, 1784, 5, 3, 0, 0, 1783, 1785, 3, 220, 110, 0, 1784, 1783, 1, 0, 0, 0, 1784, 1785, 1, 0, 0, 0, 1785, 1796, 1, 0, 0, 0, 1786, 1787, 5, 154, 0, 0, 1787, 1788, 5, 40, 0, 0, 1788, 1793, 3, 68, 34, 0, 1789, 1790, 5, 5, 0, 0, 1790, 1792, 3, 68, 34, 0, 1791, 1789, 1, 0, 0, 0, 1792, 1795, 1, 0, 0, 0, 1793, 1791, 1, 0, 0, 0, 1793, 1794, 1, 0, 0, 0, 1794, 1797, 1, 0, 0, 0, 1795, 1793, 1, 0, 0, 0, 1796, 1786, 1, 0, 0, 0, 1796, 1797, 1, 0, 0, 0, 1797, 1808, 1, 0, 0, 0, 1798, 1799, 5, 109, 0, 0, 1799, 1800, 5, 40, 0, 0, 1800, 1805, 3, 138, 69, 0, 1801, 1802, 5, 5, 0, 0, 1802, 1804, 3, 138, 69, 0, 1803, 1801, 1, 0, 0, 0, 1804, 1807, 1, 0, 0, 0, 1805, 1803, 1, 0, 0, 0, 1805, 1806, 1, 0, 0, 0, 1806, 1809, 1, 0, 0, 0, 1807, 1805, 1, 0, 0, 0, 1808, 1798, 1, 0, 0, 0, 1808, 1809, 1, 0, 0, 0, 1809, 1811, 1, 0, 0, 0, 1810, 1812, 3, 122, 61, 0, 1811, 1810, 1, 0, 0, 0, 1811, 1812, 1, 0, 0, 0, 1812, 1813, 1, 0, 0, 0, 1813, 1815, 5, 4, 0, 0, 1814, 1781, 1, 0, 0, 0, 1814, 1782, 1, 0, 0, 0, 1815, 121, 1, 0, 0, 0, 1816, 1824, 3, 124, 62, 0, 1817, 1818, 5, 181, 0, 0, 1818, 1819, 5, 101, 0, 0, 1819, 1825, 5, 183, 0, 0, 1820, 1821, 5, 158, 0, 0, 1821, 1825, 5, 127, 0, 0, 1822, 1825, 5, 78, 0, 0, 1823, 1825, 5, 182, 0, 0, 1824, 1817, 1, 0, 0, 0, 1824, 1820, 1, 0, 0, 0, 1824, 1822, 1, 0, 0, 0, 1824, 1823, 1, 0, 0, 0, 1824, 1825, 1, 0, 0, 0, 1825, 123, 1, 0, 0, 0, 1826, 1833, 7, 18, 0, 0, 1827, 1834, 3, 146, 73, 0, 1828, 1829, 5, 39, 0, 0, 1829, 1830, 3, 142, 71, 0, 1830, 1831, 5, 32, 0, 0, 1831, 1832, 3, 144, 72, 0, 1832, 1834, 1, 0, 0, 0, 1833, 1827, 1, 0, 0, 0, 1833, 1828, 1, 0, 0, 0, 1834, 125, 1, 0, 0, 0, 1835, 1836, 3, 222, 111, 0, 1836, 1846, 5, 3, 0, 0, 1837, 1842, 3, 68, 34, 0, 1838, 1839, 5, 5, 0, 0, 1839, 1841, 3, 68, 34, 0, 1840, 1838, 1, 0, 0, 0, 1841, 1844, 1, 0, 0, 0, 1842, 1840, 1, 0, 0, 0, 1842, 1843, 1, 0, 0, 0, 1843, 1847, 1, 0, 0, 0, 1844, 1842, 1, 0, 0, 0, 1845, 1847, 5, 7, 0, 0, 1846, 1837, 1, 0, 0, 0, 1846, 1845, 1, 0, 0, 0, 1847, 1848, 1, 0, 0, 0, 1848, 1849, 5, 4, 0, 0, 1849, 127, 1, 0, 0, 0, 1850, 1851, 3, 224, 112, 0, 1851, 1864, 5, 3, 0, 0, 1852, 1854, 5, 62, 0, 0, 1853, 1852, 1, 0, 0, 0, 1853, 1854, 1, 0, 0, 0, 1854, 1855, 1, 0, 0, 0, 1855, 1860, 3, 68, 34, 0, 1856, 1857, 5, 5, 0, 0, 1857, 1859, 3, 68, 34, 0, 1858, 1856, 1, 0, 0, 0, 1859, 1862, 1, 0, 0, 0, 1860, 1858, 1, 0, 0, 0, 1860, 1861, 1, 0, 0, 0, 1861, 1865, 1, 0, 0, 0, 1862, 1860, 1, 0, 0, 0, 1863, 1865, 5, 7, 0, 0, 1864, 1853, 1, 0, 0, 0, 1864, 1863, 1, 0, 0, 0, 1864, 1865, 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1868, 5, 4, 0, 0, 1867, 1869, 3, 116, 58, 0, 1868, 1867, 1, 0, 0, 0, 1868, 1869, 1, 0, 0, 0, 1869, 129, 1, 0, 0, 0, 1870, 1871, 3, 148, 74, 0, 1871, 1881, 5, 3, 0, 0, 1872, 1877, 3, 68, 34, 0, 1873, 1874, 5, 5, 0, 0, 1874, 1876, 3, 68, 34, 0, 1875, 1873, 1, 0, 0, 0, 1876, 1879, 1, 0, 0, 0, 1877, 1875, 1, 0, 0, 0, 1877, 1878, 1, 0, 0, 0, 1878, 1882, 1, 0, 0, 0, 1879, 1877, 1, 0, 0, 0, 1880, 1882, 5, 7, 0, 0, 1881, 1872, 1, 0, 0, 0, 1881, 1880, 1, 0, 0, 0, 1881, 1882, 1, 0, 0, 0, 1882, 1883, 1, 0, 0, 0, 1883, 1885, 5, 4, 0, 0, 1884, 1886, 3, 116, 58, 0, 1885, 1884, 1, 0, 0, 0, 1885, 1886, 1, 0, 0, 0, 1886, 1887, 1, 0, 0, 0, 1887, 1890, 5, 153, 0, 0, 1888, 1891, 3, 118, 59, 0, 1889, 1891, 3, 214, 107, 0, 1890, 1888, 1, 0, 0, 0, 1890, 1889, 1, 0, 0, 0, 1891, 131, 1, 0, 0, 0, 1892, 1894, 5, 150, 0, 0, 1893, 1895, 5, 116, 0, 0, 1894, 1893, 1, 0, 0, 0, 1894, 1895, 1, 0, 0, 0, 1895, 1896, 1, 0, 0, 0, 1896, 1901, 3, 56, 28, 0, 1897, 1898, 5, 5, 0, 0, 1898, 1900, 3, 56, 28, 0, 1899, 1897, 1, 0, 0, 0, 1900, 1903, 1, 0, 0, 0, 1901, 1899, 1, 0, 0, 0, 1901, 1902, 1, 0, 0, 0, 1902, 133, 1, 0, 0, 0, 1903, 1901, 1, 0, 0, 0, 1904, 1905, 5, 109, 0, 0, 1905, 1906, 5, 40, 0, 0, 1906, 1911, 3, 138, 69, 0, 1907, 1908, 5, 5, 0, 0, 1908, 1910, 3, 138, 69, 0, 1909, 1907, 1, 0, 0, 0, 1910, 1913, 1, 0, 0, 0, 1911, 1909, 1, 0, 0, 0, 1911, 1912, 1, 0, 0, 0, 1912, 135, 1, 0, 0, 0, 1913, 1911, 1, 0, 0, 0, 1914, 1915, 5, 98, 0, 0, 1915, 1918, 3, 68, 34, 0, 1916, 1917, 7, 19, 0, 0, 1917, 1919, 3, 68, 34, 0, 1918, 1916, 1, 0, 0, 0, 1918, 1919, 1, 0, 0, 0, 1919, 137, 1, 0, 0, 0, 1920, 1923, 3, 68, 34, 0, 1921, 1922, 5, 45, 0, 0, 1922, 1924, 3, 192, 96, 0, 1923, 1921, 1, 0, 0, 0, 1923, 1924, 1, 0, 0, 0, 1924, 1926, 1, 0, 0, 0, 1925, 1927, 3, 140, 70, 0, 1926, 1925, 1, 0, 0, 0, 1926, 1927, 1, 0, 0, 0, 1927, 1930, 1, 0, 0, 0, 1928, 1929, 5, 176, 0, 0, 1929, 1931, 7, 20, 0, 0, 1930, 1928, 1, 0, 0, 0, 1930, 1931, 1, 0, 0, 0, 1931, 139, 1, 0, 0, 0, 1932, 1933, 7, 21, 0, 0, 1933, 141, 1, 0, 0, 0, 1934, 1935, 3, 68, 34, 0, 1935, 1936, 5, 156, 0, 0, 1936, 1945, 1, 0, 0, 0, 1937, 1938, 3, 68, 34, 0, 1938, 1939, 5, 159, 0, 0, 1939, 1945, 1, 0, 0, 0, 1940, 1941, 5, 158, 0, 0, 1941, 1945, 5, 127, 0, 0, 1942, 1943, 5, 157, 0, 0, 1943, 1945, 5, 156, 0, 0, 1944, 1934, 1, 0, 0, 0, 1944, 1937, 1, 0, 0, 0, 1944, 1940, 1, 0, 0, 0, 1944, 1942, 1, 0, 0, 0, 1945, 143, 1, 0, 0, 0, 1946, 1947, 3, 68, 34, 0, 1947, 1948, 5, 156, 0, 0, 1948, 1957, 1, 0, 0, 0, 1949, 1950, 3, 68, 34, 0, 1950, 1951, 5, 159, 0, 0, 1951, 1957, 1, 0, 0, 0, 1952, 1953, 5, 158, 0, 0, 1953, 1957, 5, 127, 0, 0, 1954, 1955, 5, 157, 0, 0, 1955, 1957, 5, 159, 0, 0, 1956, 1946, 1, 0, 0, 0, 1956, 1949, 1, 0, 0, 0, 1956, 1952, 1, 0, 0, 0, 1956, 1954, 1, 0, 0, 0, 1957, 145, 1, 0, 0, 0, 1958, 1959, 3, 68, 34, 0, 1959, 1960, 5, 156, 0, 0, 1960, 1966, 1, 0, 0, 0, 1961, 1962, 5, 157, 0, 0, 1962, 1966, 5, 156, 0, 0, 1963, 1964, 5, 158, 0, 0, 1964, 1966, 5, 127, 0, 0, 1965, 1958, 1, 0, 0, 0, 1965, 1961, 1, 0, 0, 0, 1965, 1963, 1, 0, 0, 0, 1966, 147, 1, 0, 0, 0, 1967, 1968, 7, 22, 0, 0, 1968, 1969, 5, 3, 0, 0, 1969, 1970, 3, 68, 34, 0, 1970, 1971, 5, 4, 0, 0, 1971, 1972, 5, 153, 0, 0, 1972, 1974, 5, 3, 0, 0, 1973, 1975, 3, 154, 77, 0, 1974, 1973, 1, 0, 0, 0, 1974, 1975, 1, 0, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1978, 3, 158, 79, 0, 1977, 1979, 3, 124, 62, 0, 1978, 1977, 1, 0, 0, 0, 1978, 1979, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, 1981, 5, 4, 0, 0, 1981, 2053, 1, 0, 0, 0, 1982, 1983, 7, 23, 0, 0, 1983, 1984, 5, 3, 0, 0, 1984, 1985, 5, 4, 0, 0, 1985, 1986, 5, 153, 0, 0, 1986, 1988, 5, 3, 0, 0, 1987, 1989, 3, 154, 77, 0, 1988, 1987, 1, 0, 0, 0, 1988, 1989, 1, 0, 0, 0, 1989, 1991, 1, 0, 0, 0, 1990, 1992, 3, 156, 78, 0, 1991, 1990, 1, 0, 0, 0, 1991, 1992, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, 2053, 5, 4, 0, 0, 1994, 1995, 7, 24, 0, 0, 1995, 1996, 5, 3, 0, 0, 1996, 1997, 5, 4, 0, 0, 1997, 1998, 5, 153, 0, 0, 1998, 2000, 5, 3, 0, 0, 1999, 2001, 3, 154, 77, 0, 2000, 1999, 1, 0, 0, 0, 2000, 2001, 1, 0, 0, 0, 2001, 2002, 1, 0, 0, 0, 2002, 2003, 3, 158, 79, 0, 2003, 2004, 5, 4, 0, 0, 2004, 2053, 1, 0, 0, 0, 2005, 2006, 7, 25, 0, 0, 2006, 2007, 5, 3, 0, 0, 2007, 2009, 3, 68, 34, 0, 2008, 2010, 3, 150, 75, 0, 2009, 2008, 1, 0, 0, 0, 2009, 2010, 1, 0, 0, 0, 2010, 2012, 1, 0, 0, 0, 2011, 2013, 3, 152, 76, 0, 2012, 2011, 1, 0, 0, 0, 2012, 2013, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, 0, 2014, 2015, 5, 4, 0, 0, 2015, 2016, 5, 153, 0, 0, 2016, 2018, 5, 3, 0, 0, 2017, 2019, 3, 154, 77, 0, 2018, 2017, 1, 0, 0, 0, 2018, 2019, 1, 0, 0, 0, 2019, 2020, 1, 0, 0, 0, 2020, 2021, 3, 158, 79, 0, 2021, 2022, 5, 4, 0, 0, 2022, 2053, 1, 0, 0, 0, 2023, 2024, 5, 165, 0, 0, 2024, 2025, 5, 3, 0, 0, 2025, 2026, 3, 68, 34, 0, 2026, 2027, 5, 5, 0, 0, 2027, 2028, 3, 36, 18, 0, 2028, 2029, 5, 4, 0, 0, 2029, 2030, 5, 153, 0, 0, 2030, 2032, 5, 3, 0, 0, 2031, 2033, 3, 154, 77, 0, 2032, 2031, 1, 0, 0, 0, 2032, 2033, 1, 0, 0, 0, 2033, 2034, 1, 0, 0, 0, 2034, 2036, 3, 158, 79, 0, 2035, 2037, 3, 124, 62, 0, 2036, 2035, 1, 0, 0, 0, 2036, 2037, 1, 0, 0, 0, 2037, 2038, 1, 0, 0, 0, 2038, 2039, 5, 4, 0, 0, 2039, 2053, 1, 0, 0, 0, 2040, 2041, 5, 166, 0, 0, 2041, 2042, 5, 3, 0, 0, 2042, 2043, 3, 68, 34, 0, 2043, 2044, 5, 4, 0, 0, 2044, 2045, 5, 153, 0, 0, 2045, 2047, 5, 3, 0, 0, 2046, 2048, 3, 154, 77, 0, 2047, 2046, 1, 0, 0, 0, 2047, 2048, 1, 0, 0, 0, 2048, 2049, 1, 0, 0, 0, 2049, 2050, 3, 158, 79, 0, 2050, 2051, 5, 4, 0, 0, 2051, 2053, 1, 0, 0, 0, 2052, 1967, 1, 0, 0, 0, 2052, 1982, 1, 0, 0, 0, 2052, 1994, 1, 0, 0, 0, 2052, 2005, 1, 0, 0, 0, 2052, 2023, 1, 0, 0, 0, 2052, 2040, 1, 0, 0, 0, 2053, 149, 1, 0, 0, 0, 2054, 2055, 5, 5, 0, 0, 2055, 2056, 3, 36, 18, 0, 2056, 151, 1, 0, 0, 0, 2057, 2058, 5, 5, 0, 0, 2058, 2059, 3, 36, 18, 0, 2059, 153, 1, 0, 0, 0, 2060, 2061, 5, 154, 0, 0, 2061, 2063, 5, 40, 0, 0, 2062, 2064, 3, 68, 34, 0, 2063, 2062, 1, 0, 0, 0, 2064, 2065, 1, 0, 0, 0, 2065, 2063, 1, 0, 0, 0, 2065, 2066, 1, 0, 0, 0, 2066, 155, 1, 0, 0, 0, 2067, 2068, 5, 109, 0, 0, 2068, 2070, 5, 40, 0, 0, 2069, 2071, 3, 68, 34, 0, 2070, 2069, 1, 0, 0, 0, 2071, 2072, 1, 0, 0, 0, 2072, 2070, 1, 0, 0, 0, 2072, 2073, 1, 0, 0, 0, 2073, 157, 1, 0, 0, 0, 2074, 2075, 5, 109, 0, 0, 2075, 2076, 5, 40, 0, 0, 2076, 2077, 3, 158, 79, 0, 2077, 159, 1, 0, 0, 0, 2078, 2080, 3, 68, 34, 0, 2079, 2081, 3, 140, 70, 0, 2080, 2079, 1, 0, 0, 0, 2080, 2081, 1, 0, 0, 0, 2081, 2089, 1, 0, 0, 0, 2082, 2083, 5, 5, 0, 0, 2083, 2085, 3, 68, 34, 0, 2084, 2086, 3, 140, 70, 0, 2085, 2084, 1, 0, 0, 0, 2085, 2086, 1, 0, 0, 0, 2086, 2088, 1, 0, 0, 0, 2087, 2082, 1, 0, 0, 0, 2088, 2091, 1, 0, 0, 0, 2089, 2087, 1, 0, 0, 0, 2089, 2090, 1, 0, 0, 0, 2090, 161, 1, 0, 0, 0, 2091, 2089, 1, 0, 0, 0, 2092, 2093, 3, 84, 42, 0, 2093, 163, 1, 0, 0, 0, 2094, 2095, 3, 84, 42, 0, 2095, 165, 1, 0, 0, 0, 2096, 2097, 7, 26, 0, 0, 2097, 167, 1, 0, 0, 0, 2098, 2099, 5, 190, 0, 0, 2099, 169, 1, 0, 0, 0, 2100, 2103, 3, 68, 34, 0, 2101, 2103, 3, 30, 15, 0, 2102, 2100, 1, 0, 0, 0, 2102, 2101, 1, 0, 0, 0, 2103, 171, 1, 0, 0, 0, 2104, 2105, 7, 27, 0, 0, 2105, 173, 1, 0, 0, 0, 2106, 2107, 7, 28, 0, 0, 2107, 175, 1, 0, 0, 0, 2108, 2109, 3, 228, 114, 0, 2109, 177, 1, 0, 0, 0, 2110, 2111, 3, 228, 114, 0, 2111, 179, 1, 0, 0, 0, 2112, 2113, 3, 182, 91, 0, 2113, 2114, 5, 2, 0, 0, 2114, 2116, 1, 0, 0, 0, 2115, 2112, 1, 0, 0, 0, 2115, 2116, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2118, 3, 178, 89, 0, 2118, 181, 1, 0, 0, 0, 2119, 2120, 3, 228, 114, 0, 2120, 183, 1, 0, 0, 0, 2121, 2122, 3, 228, 114, 0, 2122, 185, 1, 0, 0, 0, 2123, 2124, 3, 228, 114, 0, 2124, 187, 1, 0, 0, 0, 2125, 2126, 3, 228, 114, 0, 2126, 189, 1, 0, 0, 0, 2127, 2128, 3, 228, 114, 0, 2128, 191, 1, 0, 0, 0, 2129, 2130, 3, 228, 114, 0, 2130, 193, 1, 0, 0, 0, 2131, 2132, 3, 228, 114, 0, 2132, 195, 1, 0, 0, 0, 2133, 2134, 3, 228, 114, 0, 2134, 197, 1, 0, 0, 0, 2135, 2136, 3, 228, 114, 0, 2136, 199, 1, 0, 0, 0, 2137, 2138, 3, 228, 114, 0, 2138, 201, 1, 0, 0, 0, 2139, 2140, 3, 228, 114, 0, 2140, 203, 1, 0, 0, 0, 2141, 2142, 3, 228, 114, 0, 2142, 205, 1, 0, 0, 0, 2143, 2144, 3, 228, 114, 0, 2144, 207, 1, 0, 0, 0, 2145, 2146, 7, 27, 0, 0, 2146, 209, 1, 0, 0, 0, 2147, 2148, 3, 228, 114, 0, 2148, 211, 1, 0, 0, 0, 2149, 2150, 3, 228, 114, 0, 2150, 213, 1, 0, 0, 0, 2151, 2152, 3, 228, 114, 0, 2152, 215, 1, 0, 0, 0, 2153, 2154, 3, 228, 114, 0, 2154, 217, 1, 0, 0, 0, 2155, 2156, 3, 228, 114, 0, 2156, 219, 1, 0, 0, 0, 2157, 2158, 3, 228, 114, 0, 2158, 221, 1, 0, 0, 0, 2159, 2160, 3, 228, 114, 0, 2160, 223, 1, 0, 0, 0, 2161, 2162, 3, 228, 114, 0, 2162, 225, 1, 0, 0, 0, 2163, 2164, 3, 228, 114, 0, 2164, 227, 1, 0, 0, 0, 2165, 2173, 5, 186, 0, 0, 2166, 2173, 3, 174, 87, 0, 2167, 2173, 5, 190, 0, 0, 2168, 2169, 5, 3, 0, 0, 2169, 2170, 3, 228, 114, 0, 2170, 2171, 5, 4, 0, 0, 2171, 2173, 1, 0, 0, 0, 2172, 2165, 1, 0, 0, 0, 2172, 2166, 1, 0, 0, 0, 2172, 2167, 1, 0, 0, 0, 2172, 2168, 1, 0, 0, 0, 2173, 229, 1, 0, 0, 0, 314, 233, 241, 248, 253, 259, 265, 267, 293, 300, 307, 313, 317, 322, 325, 332, 335, 339, 347, 351, 353, 357, 361, 365, 368, 375, 381, 387, 392, 403, 409, 413, 417, 420, 425, 429, 435, 440, 449, 456, 465, 468, 472, 476, 481, 487, 499, 503, 508, 511, 514, 519, 522, 536, 543, 550, 552, 555, 561, 566, 574, 579, 594, 600, 610, 615, 625, 629, 631, 635, 640, 642, 650, 656, 661, 668, 679, 682, 684, 691, 695, 702, 708, 714, 720, 725, 734, 739, 750, 755, 766, 771, 775, 791, 801, 806, 814, 826, 831, 842, 845, 847, 853, 856, 858, 862, 866, 873, 876, 879, 886, 889, 892, 895, 899, 907, 912, 923, 928, 937, 944, 948, 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1031, 1038, 1049, 1058, 1068, 1071, 1077, 1083, 1092, 1095, 1099, 1106, 1112, 1119, 1121, 1123, 1132, 1139, 1146, 1152, 1157, 1165, 1170, 1179, 1190, 1197, 1201, 1204, 1207, 1211, 1221, 1227, 1229, 1237, 1244, 1251, 1256, 1258, 1264, 1273, 1278, 1285, 1289, 1291, 1294, 1302, 1306, 1309, 1318, 1323, 1330, 1339, 1343, 1345, 1349, 1358, 1363, 1365, 1378, 1381, 1390, 1401, 1408, 1411, 1416, 1420, 1423, 1426, 1431, 1435, 1440, 1443, 1446, 1451, 1455, 1458, 1465, 1470, 1479, 1484, 1487, 1495, 1499, 1507, 1510, 1515, 1519, 1522, 1529, 1534, 1543, 1548, 1551, 1559, 1563, 1571, 1574, 1576, 1585, 1588, 1590, 1594, 1598, 1601, 1606, 1617, 1622, 1626, 1630, 1633, 1638, 1644, 1651, 1658, 1663, 1666, 1674, 1680, 1685, 1691, 1698, 1705, 1710, 1713, 1716, 1721, 1726, 1733, 1737, 1741, 1751, 1760, 1763, 1772, 1776, 1784, 1793, 1796, 1805, 1808, 1811, 1814, 1824, 1833, 1842, 1846, 1853, 1860, 1864, 1868, 1877, 1881, 1885, 1890, 1894, 1901, 1911, 1918, 1923, 1926, 1930, 1944, 1956, 1965, 1974, 1978, 1988, 1991, 2000, 2009, 2012, 2018, 2032, 2036, 2047, 2052, 2065, 2072, 2080, 2085, 2089, 2102, 2115, 2172] \ No newline at end of file +[4, 1, 197, 2176, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 1, 0, 5, 0, 232, 8, 0, 10, 0, 12, 0, 235, 9, 0, 1, 0, 1, 0, 1, 1, 5, 1, 240, 8, 1, 10, 1, 12, 1, 243, 9, 1, 1, 1, 1, 1, 4, 1, 247, 8, 1, 11, 1, 12, 1, 248, 1, 1, 5, 1, 252, 8, 1, 10, 1, 12, 1, 255, 9, 1, 1, 1, 5, 1, 258, 8, 1, 10, 1, 12, 1, 261, 9, 1, 1, 2, 1, 2, 1, 2, 3, 2, 266, 8, 2, 3, 2, 268, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 294, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 301, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 308, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 314, 8, 3, 1, 3, 1, 3, 3, 3, 318, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 323, 8, 3, 1, 3, 3, 3, 326, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 333, 8, 4, 1, 4, 3, 4, 336, 8, 4, 1, 5, 1, 5, 3, 5, 340, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 3, 6, 348, 8, 6, 1, 6, 1, 6, 3, 6, 352, 8, 6, 3, 6, 354, 8, 6, 1, 7, 1, 7, 3, 7, 358, 8, 7, 1, 8, 1, 8, 3, 8, 362, 8, 8, 1, 8, 1, 8, 3, 8, 366, 8, 8, 1, 8, 3, 8, 369, 8, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 376, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 382, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 388, 8, 11, 1, 11, 1, 11, 1, 11, 3, 11, 393, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 402, 8, 11, 10, 11, 12, 11, 405, 9, 11, 1, 11, 1, 11, 1, 11, 3, 11, 410, 8, 11, 1, 12, 1, 12, 3, 12, 414, 8, 12, 1, 12, 1, 12, 3, 12, 418, 8, 12, 1, 12, 3, 12, 421, 8, 12, 1, 13, 1, 13, 1, 13, 3, 13, 426, 8, 13, 1, 14, 1, 14, 3, 14, 430, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 436, 8, 14, 1, 14, 1, 14, 1, 14, 3, 14, 441, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 448, 8, 14, 10, 14, 12, 14, 451, 9, 14, 1, 14, 1, 14, 5, 14, 455, 8, 14, 10, 14, 12, 14, 458, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 464, 8, 14, 10, 14, 12, 14, 467, 9, 14, 3, 14, 469, 8, 14, 1, 14, 1, 14, 3, 14, 473, 8, 14, 1, 15, 1, 15, 3, 15, 477, 8, 15, 1, 15, 5, 15, 480, 8, 15, 10, 15, 12, 15, 483, 9, 15, 1, 16, 4, 16, 486, 8, 16, 11, 16, 12, 16, 487, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 500, 8, 16, 1, 17, 1, 17, 3, 17, 504, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 509, 8, 17, 1, 17, 3, 17, 512, 8, 17, 1, 17, 3, 17, 515, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 520, 8, 17, 1, 17, 3, 17, 523, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 537, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 544, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 551, 8, 17, 3, 17, 553, 8, 17, 1, 18, 3, 18, 556, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 562, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 567, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 573, 8, 19, 10, 19, 12, 19, 576, 9, 19, 1, 19, 1, 19, 3, 19, 580, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 593, 8, 19, 10, 19, 12, 19, 596, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 601, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 609, 8, 20, 10, 20, 12, 20, 612, 9, 20, 1, 20, 1, 20, 3, 20, 616, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 626, 8, 20, 1, 20, 1, 20, 5, 20, 630, 8, 20, 10, 20, 12, 20, 633, 9, 20, 1, 20, 3, 20, 636, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 641, 8, 20, 3, 20, 643, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 651, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 657, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 662, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 669, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 678, 8, 22, 10, 22, 12, 22, 681, 9, 22, 3, 22, 683, 8, 22, 3, 22, 685, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 692, 8, 22, 1, 22, 1, 22, 3, 22, 696, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 703, 8, 22, 1, 22, 1, 22, 4, 22, 707, 8, 22, 11, 22, 12, 22, 708, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 715, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 721, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 726, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 733, 8, 23, 10, 23, 12, 23, 736, 9, 23, 1, 23, 1, 23, 3, 23, 740, 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 751, 8, 24, 1, 24, 1, 24, 1, 24, 3, 24, 756, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 765, 8, 24, 10, 24, 12, 24, 768, 9, 24, 1, 24, 1, 24, 3, 24, 772, 8, 24, 1, 25, 1, 25, 3, 25, 776, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 790, 8, 25, 10, 25, 12, 25, 793, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 800, 8, 26, 10, 26, 12, 26, 803, 9, 26, 1, 26, 1, 26, 3, 26, 807, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 815, 8, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 825, 8, 28, 10, 28, 12, 28, 828, 9, 28, 1, 28, 1, 28, 3, 28, 832, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 843, 8, 29, 1, 29, 3, 29, 846, 8, 29, 3, 29, 848, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 854, 8, 29, 1, 29, 3, 29, 857, 8, 29, 3, 29, 859, 8, 29, 5, 29, 861, 8, 29, 10, 29, 12, 29, 864, 9, 29, 1, 30, 3, 30, 867, 8, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 874, 8, 30, 1, 30, 3, 30, 877, 8, 30, 1, 31, 3, 31, 880, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 887, 8, 31, 1, 31, 3, 31, 890, 8, 31, 1, 31, 3, 31, 893, 8, 31, 1, 31, 3, 31, 896, 8, 31, 1, 32, 1, 32, 3, 32, 900, 8, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 908, 8, 33, 1, 33, 1, 33, 1, 33, 3, 33, 913, 8, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 924, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 929, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 938, 8, 34, 1, 34, 1, 34, 1, 34, 5, 34, 943, 8, 34, 10, 34, 12, 34, 946, 9, 34, 1, 34, 3, 34, 949, 8, 34, 1, 34, 1, 34, 3, 34, 953, 8, 34, 1, 34, 3, 34, 956, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 962, 8, 34, 10, 34, 12, 34, 965, 9, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 977, 8, 34, 1, 34, 3, 34, 980, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 988, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 4, 34, 995, 8, 34, 11, 34, 12, 34, 996, 1, 34, 1, 34, 3, 34, 1001, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1006, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1035, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1042, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1053, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1062, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1070, 8, 34, 10, 34, 12, 34, 1073, 9, 34, 3, 34, 1075, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1081, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1087, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1094, 8, 34, 10, 34, 12, 34, 1097, 9, 34, 3, 34, 1099, 8, 34, 1, 34, 1, 34, 3, 34, 1103, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1110, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1116, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1123, 8, 34, 5, 34, 1125, 8, 34, 10, 34, 12, 34, 1128, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 1136, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3, 37, 1143, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1150, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1156, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1161, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1167, 8, 37, 10, 37, 12, 37, 1170, 9, 37, 1, 37, 1, 37, 3, 37, 1174, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1181, 8, 37, 10, 37, 12, 37, 1184, 9, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1192, 8, 37, 10, 37, 12, 37, 1195, 9, 37, 1, 37, 1, 37, 5, 37, 1199, 8, 37, 10, 37, 12, 37, 1202, 9, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1207, 8, 37, 1, 37, 3, 37, 1210, 8, 37, 1, 37, 3, 37, 1213, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1221, 8, 38, 10, 38, 12, 38, 1224, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1229, 8, 38, 3, 38, 1231, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1239, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1246, 8, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1251, 8, 38, 10, 38, 12, 38, 1254, 9, 38, 1, 38, 1, 38, 3, 38, 1258, 8, 38, 3, 38, 1260, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1266, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1275, 8, 39, 1, 40, 1, 40, 1, 40, 3, 40, 1280, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1287, 8, 41, 1, 41, 1, 41, 3, 41, 1291, 8, 41, 3, 41, 1293, 8, 41, 1, 42, 3, 42, 1296, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 1302, 8, 42, 10, 42, 12, 42, 1305, 9, 42, 1, 42, 3, 42, 1308, 8, 42, 1, 42, 3, 42, 1311, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1318, 8, 43, 10, 43, 12, 43, 1321, 9, 43, 1, 44, 1, 44, 3, 44, 1325, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1330, 8, 44, 10, 44, 12, 44, 1333, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1339, 8, 44, 10, 44, 12, 44, 1342, 9, 44, 1, 44, 3, 44, 1345, 8, 44, 3, 44, 1347, 8, 44, 1, 44, 1, 44, 3, 44, 1351, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1358, 8, 44, 10, 44, 12, 44, 1361, 9, 44, 1, 44, 1, 44, 3, 44, 1365, 8, 44, 3, 44, 1367, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1378, 8, 44, 10, 44, 12, 44, 1381, 9, 44, 3, 44, 1383, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1390, 8, 44, 10, 44, 12, 44, 1393, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1401, 8, 44, 10, 44, 12, 44, 1404, 9, 44, 1, 44, 1, 44, 5, 44, 1408, 8, 44, 10, 44, 12, 44, 1411, 9, 44, 3, 44, 1413, 8, 44, 1, 45, 1, 45, 1, 46, 3, 46, 1418, 8, 46, 1, 46, 1, 46, 3, 46, 1422, 8, 46, 1, 46, 3, 46, 1425, 8, 46, 1, 47, 3, 47, 1428, 8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1433, 8, 47, 1, 47, 1, 47, 3, 47, 1437, 8, 47, 1, 47, 4, 47, 1440, 8, 47, 11, 47, 12, 47, 1441, 1, 47, 3, 47, 1445, 8, 47, 1, 47, 3, 47, 1448, 8, 47, 1, 48, 1, 48, 1, 48, 3, 48, 1453, 8, 48, 1, 48, 1, 48, 3, 48, 1457, 8, 48, 1, 48, 3, 48, 1460, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1467, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1472, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1479, 8, 48, 10, 48, 12, 48, 1482, 9, 48, 1, 48, 1, 48, 3, 48, 1486, 8, 48, 1, 48, 3, 48, 1489, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1495, 8, 48, 10, 48, 12, 48, 1498, 9, 48, 1, 48, 3, 48, 1501, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1509, 8, 48, 1, 48, 3, 48, 1512, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1517, 8, 48, 1, 48, 1, 48, 3, 48, 1521, 8, 48, 1, 48, 3, 48, 1524, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1531, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1536, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1543, 8, 48, 10, 48, 12, 48, 1546, 9, 48, 1, 48, 1, 48, 3, 48, 1550, 8, 48, 1, 48, 3, 48, 1553, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1559, 8, 48, 10, 48, 12, 48, 1562, 9, 48, 1, 48, 3, 48, 1565, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1573, 8, 48, 1, 48, 3, 48, 1576, 8, 48, 3, 48, 1578, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1587, 8, 49, 1, 49, 3, 49, 1590, 8, 49, 3, 49, 1592, 8, 49, 1, 50, 1, 50, 3, 50, 1596, 8, 50, 1, 50, 1, 50, 3, 50, 1600, 8, 50, 1, 50, 3, 50, 1603, 8, 50, 1, 50, 1, 50, 1, 50, 3, 50, 1608, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 5, 51, 1617, 8, 51, 10, 51, 12, 51, 1620, 9, 51, 1, 51, 1, 51, 3, 51, 1624, 8, 51, 1, 52, 1, 52, 3, 52, 1628, 8, 52, 1, 52, 1, 52, 3, 52, 1632, 8, 52, 1, 53, 3, 53, 1635, 8, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1640, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1646, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1653, 8, 53, 1, 53, 1, 53, 1, 53, 5, 53, 1658, 8, 53, 10, 53, 12, 53, 1661, 9, 53, 1, 53, 1, 53, 3, 53, 1665, 8, 53, 1, 53, 3, 53, 1668, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1674, 8, 54, 10, 54, 12, 54, 1677, 9, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1682, 8, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1687, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1693, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1700, 8, 55, 1, 55, 1, 55, 1, 55, 5, 55, 1705, 8, 55, 10, 55, 12, 55, 1708, 9, 55, 1, 55, 1, 55, 3, 55, 1712, 8, 55, 1, 55, 3, 55, 1715, 8, 55, 1, 55, 3, 55, 1718, 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1723, 8, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1728, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1735, 8, 56, 1, 57, 1, 57, 3, 57, 1739, 8, 57, 1, 57, 1, 57, 3, 57, 1743, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 3, 59, 1753, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1760, 8, 59, 10, 59, 12, 59, 1763, 9, 59, 3, 59, 1765, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1772, 8, 59, 10, 59, 12, 59, 1775, 9, 59, 1, 59, 3, 59, 1778, 8, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1786, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1793, 8, 60, 10, 60, 12, 60, 1796, 9, 60, 3, 60, 1798, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1805, 8, 60, 10, 60, 12, 60, 1808, 9, 60, 3, 60, 1810, 8, 60, 1, 60, 3, 60, 1813, 8, 60, 1, 60, 3, 60, 1816, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1826, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1835, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 1842, 8, 63, 10, 63, 12, 63, 1845, 9, 63, 1, 63, 3, 63, 1848, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 3, 64, 1855, 8, 64, 1, 64, 1, 64, 1, 64, 5, 64, 1860, 8, 64, 10, 64, 12, 64, 1863, 9, 64, 1, 64, 3, 64, 1866, 8, 64, 1, 64, 1, 64, 3, 64, 1870, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 5, 65, 1877, 8, 65, 10, 65, 12, 65, 1880, 9, 65, 1, 65, 3, 65, 1883, 8, 65, 1, 65, 1, 65, 3, 65, 1887, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1892, 8, 65, 1, 66, 1, 66, 3, 66, 1896, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1901, 8, 66, 10, 66, 12, 66, 1904, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 1911, 8, 67, 10, 67, 12, 67, 1914, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1920, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1925, 8, 69, 1, 69, 3, 69, 1928, 8, 69, 1, 69, 1, 69, 3, 69, 1932, 8, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 1946, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 1958, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1967, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1976, 8, 74, 1, 74, 1, 74, 3, 74, 1980, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1990, 8, 74, 1, 74, 3, 74, 1993, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2002, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2011, 8, 74, 1, 74, 3, 74, 2014, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2020, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2034, 8, 74, 1, 74, 1, 74, 3, 74, 2038, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2049, 8, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2054, 8, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 4, 77, 2065, 8, 77, 11, 77, 12, 77, 2066, 1, 78, 1, 78, 1, 78, 4, 78, 2072, 8, 78, 11, 78, 12, 78, 2073, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 2082, 8, 80, 1, 80, 1, 80, 1, 80, 3, 80, 2087, 8, 80, 5, 80, 2089, 8, 80, 10, 80, 12, 80, 2092, 9, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 3, 85, 2104, 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2117, 8, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 2174, 8, 114, 1, 114, 2, 449, 487, 1, 68, 115, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 0, 30, 3, 0, 60, 60, 71, 71, 84, 84, 2, 0, 49, 49, 68, 68, 1, 0, 136, 137, 2, 0, 149, 149, 174, 174, 2, 0, 8, 8, 11, 11, 2, 0, 61, 61, 144, 144, 2, 0, 58, 58, 106, 106, 2, 0, 60, 60, 84, 84, 5, 0, 27, 27, 74, 74, 83, 83, 124, 124, 128, 128, 4, 0, 86, 86, 135, 135, 141, 141, 148, 148, 1, 0, 9, 10, 2, 0, 7, 7, 14, 15, 1, 0, 16, 19, 1, 0, 20, 23, 4, 0, 79, 79, 99, 99, 101, 101, 120, 120, 3, 0, 27, 27, 74, 74, 128, 128, 5, 0, 54, 56, 106, 106, 175, 176, 189, 189, 192, 193, 2, 0, 31, 31, 64, 64, 3, 0, 78, 78, 98, 98, 127, 127, 3, 0, 130, 130, 157, 157, 182, 182, 2, 0, 5, 5, 108, 108, 1, 0, 179, 180, 2, 0, 36, 36, 62, 62, 2, 0, 154, 154, 165, 165, 2, 0, 162, 162, 169, 169, 2, 0, 163, 163, 170, 171, 2, 0, 164, 164, 166, 166, 3, 0, 8, 8, 11, 12, 104, 104, 2, 0, 188, 188, 192, 192, 1, 0, 27, 183, 2482, 0, 233, 1, 0, 0, 0, 2, 241, 1, 0, 0, 0, 4, 267, 1, 0, 0, 0, 6, 295, 1, 0, 0, 0, 8, 327, 1, 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, 345, 1, 0, 0, 0, 14, 355, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 370, 1, 0, 0, 0, 20, 373, 1, 0, 0, 0, 22, 379, 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, 26, 425, 1, 0, 0, 0, 28, 427, 1, 0, 0, 0, 30, 474, 1, 0, 0, 0, 32, 485, 1, 0, 0, 0, 34, 503, 1, 0, 0, 0, 36, 555, 1, 0, 0, 0, 38, 561, 1, 0, 0, 0, 40, 602, 1, 0, 0, 0, 42, 644, 1, 0, 0, 0, 44, 648, 1, 0, 0, 0, 46, 712, 1, 0, 0, 0, 48, 744, 1, 0, 0, 0, 50, 773, 1, 0, 0, 0, 52, 794, 1, 0, 0, 0, 54, 808, 1, 0, 0, 0, 56, 819, 1, 0, 0, 0, 58, 838, 1, 0, 0, 0, 60, 866, 1, 0, 0, 0, 62, 879, 1, 0, 0, 0, 64, 897, 1, 0, 0, 0, 66, 903, 1, 0, 0, 0, 68, 1005, 1, 0, 0, 0, 70, 1129, 1, 0, 0, 0, 72, 1139, 1, 0, 0, 0, 74, 1142, 1, 0, 0, 0, 76, 1214, 1, 0, 0, 0, 78, 1261, 1, 0, 0, 0, 80, 1279, 1, 0, 0, 0, 82, 1281, 1, 0, 0, 0, 84, 1295, 1, 0, 0, 0, 86, 1312, 1, 0, 0, 0, 88, 1412, 1, 0, 0, 0, 90, 1414, 1, 0, 0, 0, 92, 1417, 1, 0, 0, 0, 94, 1427, 1, 0, 0, 0, 96, 1577, 1, 0, 0, 0, 98, 1591, 1, 0, 0, 0, 100, 1607, 1, 0, 0, 0, 102, 1623, 1, 0, 0, 0, 104, 1631, 1, 0, 0, 0, 106, 1634, 1, 0, 0, 0, 108, 1669, 1, 0, 0, 0, 110, 1681, 1, 0, 0, 0, 112, 1722, 1, 0, 0, 0, 114, 1736, 1, 0, 0, 0, 116, 1744, 1, 0, 0, 0, 118, 1750, 1, 0, 0, 0, 120, 1781, 1, 0, 0, 0, 122, 1817, 1, 0, 0, 0, 124, 1827, 1, 0, 0, 0, 126, 1836, 1, 0, 0, 0, 128, 1851, 1, 0, 0, 0, 130, 1871, 1, 0, 0, 0, 132, 1893, 1, 0, 0, 0, 134, 1905, 1, 0, 0, 0, 136, 1915, 1, 0, 0, 0, 138, 1921, 1, 0, 0, 0, 140, 1933, 1, 0, 0, 0, 142, 1945, 1, 0, 0, 0, 144, 1957, 1, 0, 0, 0, 146, 1966, 1, 0, 0, 0, 148, 2053, 1, 0, 0, 0, 150, 2055, 1, 0, 0, 0, 152, 2058, 1, 0, 0, 0, 154, 2061, 1, 0, 0, 0, 156, 2068, 1, 0, 0, 0, 158, 2075, 1, 0, 0, 0, 160, 2079, 1, 0, 0, 0, 162, 2093, 1, 0, 0, 0, 164, 2095, 1, 0, 0, 0, 166, 2097, 1, 0, 0, 0, 168, 2099, 1, 0, 0, 0, 170, 2103, 1, 0, 0, 0, 172, 2105, 1, 0, 0, 0, 174, 2107, 1, 0, 0, 0, 176, 2109, 1, 0, 0, 0, 178, 2111, 1, 0, 0, 0, 180, 2116, 1, 0, 0, 0, 182, 2120, 1, 0, 0, 0, 184, 2122, 1, 0, 0, 0, 186, 2124, 1, 0, 0, 0, 188, 2126, 1, 0, 0, 0, 190, 2128, 1, 0, 0, 0, 192, 2130, 1, 0, 0, 0, 194, 2132, 1, 0, 0, 0, 196, 2134, 1, 0, 0, 0, 198, 2136, 1, 0, 0, 0, 200, 2138, 1, 0, 0, 0, 202, 2140, 1, 0, 0, 0, 204, 2142, 1, 0, 0, 0, 206, 2144, 1, 0, 0, 0, 208, 2146, 1, 0, 0, 0, 210, 2148, 1, 0, 0, 0, 212, 2150, 1, 0, 0, 0, 214, 2152, 1, 0, 0, 0, 216, 2154, 1, 0, 0, 0, 218, 2156, 1, 0, 0, 0, 220, 2158, 1, 0, 0, 0, 222, 2160, 1, 0, 0, 0, 224, 2162, 1, 0, 0, 0, 226, 2164, 1, 0, 0, 0, 228, 2173, 1, 0, 0, 0, 230, 232, 3, 2, 1, 0, 231, 230, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 0, 0, 1, 237, 1, 1, 0, 0, 0, 238, 240, 5, 1, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244, 253, 3, 4, 2, 0, 245, 247, 5, 1, 0, 0, 246, 245, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 3, 4, 2, 0, 251, 246, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 259, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 258, 5, 1, 0, 0, 257, 256, 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 3, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 265, 5, 73, 0, 0, 263, 264, 5, 116, 0, 0, 264, 266, 5, 113, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, 267, 262, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 293, 1, 0, 0, 0, 269, 294, 3, 6, 3, 0, 270, 294, 3, 8, 4, 0, 271, 294, 3, 10, 5, 0, 272, 294, 3, 12, 6, 0, 273, 294, 3, 14, 7, 0, 274, 294, 3, 22, 11, 0, 275, 294, 3, 28, 14, 0, 276, 294, 3, 44, 22, 0, 277, 294, 3, 46, 23, 0, 278, 294, 3, 48, 24, 0, 279, 294, 3, 60, 30, 0, 280, 294, 3, 62, 31, 0, 281, 294, 3, 64, 32, 0, 282, 294, 3, 66, 33, 0, 283, 294, 3, 74, 37, 0, 284, 294, 3, 78, 39, 0, 285, 294, 3, 82, 41, 0, 286, 294, 3, 20, 10, 0, 287, 294, 3, 16, 8, 0, 288, 294, 3, 18, 9, 0, 289, 294, 3, 84, 42, 0, 290, 294, 3, 106, 53, 0, 291, 294, 3, 110, 55, 0, 292, 294, 3, 114, 57, 0, 293, 269, 1, 0, 0, 0, 293, 270, 1, 0, 0, 0, 293, 271, 1, 0, 0, 0, 293, 272, 1, 0, 0, 0, 293, 273, 1, 0, 0, 0, 293, 274, 1, 0, 0, 0, 293, 275, 1, 0, 0, 0, 293, 276, 1, 0, 0, 0, 293, 277, 1, 0, 0, 0, 293, 278, 1, 0, 0, 0, 293, 279, 1, 0, 0, 0, 293, 280, 1, 0, 0, 0, 293, 281, 1, 0, 0, 0, 293, 282, 1, 0, 0, 0, 293, 283, 1, 0, 0, 0, 293, 284, 1, 0, 0, 0, 293, 285, 1, 0, 0, 0, 293, 286, 1, 0, 0, 0, 293, 287, 1, 0, 0, 0, 293, 288, 1, 0, 0, 0, 293, 289, 1, 0, 0, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 294, 5, 1, 0, 0, 0, 295, 296, 5, 32, 0, 0, 296, 300, 5, 135, 0, 0, 297, 298, 3, 182, 91, 0, 298, 299, 5, 2, 0, 0, 299, 301, 1, 0, 0, 0, 300, 297, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 325, 3, 184, 92, 0, 303, 313, 5, 123, 0, 0, 304, 305, 5, 139, 0, 0, 305, 314, 3, 188, 94, 0, 306, 308, 5, 48, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 3, 190, 95, 0, 310, 311, 5, 139, 0, 0, 311, 312, 3, 190, 95, 0, 312, 314, 1, 0, 0, 0, 313, 304, 1, 0, 0, 0, 313, 307, 1, 0, 0, 0, 314, 326, 1, 0, 0, 0, 315, 317, 5, 29, 0, 0, 316, 318, 5, 48, 0, 0, 317, 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 326, 3, 30, 15, 0, 320, 322, 5, 65, 0, 0, 321, 323, 5, 48, 0, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 326, 3, 190, 95, 0, 325, 303, 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, 325, 320, 1, 0, 0, 0, 326, 7, 1, 0, 0, 0, 327, 335, 5, 33, 0, 0, 328, 336, 3, 182, 91, 0, 329, 330, 3, 182, 91, 0, 330, 331, 5, 2, 0, 0, 331, 333, 1, 0, 0, 0, 332, 329, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 3, 186, 93, 0, 335, 328, 1, 0, 0, 0, 335, 332, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 9, 1, 0, 0, 0, 337, 339, 5, 37, 0, 0, 338, 340, 5, 57, 0, 0, 339, 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, 3, 68, 34, 0, 342, 343, 5, 35, 0, 0, 343, 344, 3, 182, 91, 0, 344, 11, 1, 0, 0, 0, 345, 347, 5, 40, 0, 0, 346, 348, 7, 0, 0, 0, 347, 346, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 353, 1, 0, 0, 0, 349, 351, 5, 140, 0, 0, 350, 352, 3, 212, 106, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 13, 1, 0, 0, 0, 355, 357, 7, 1, 0, 0, 356, 358, 5, 140, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 15, 1, 0, 0, 0, 359, 361, 5, 128, 0, 0, 360, 362, 5, 140, 0, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 368, 1, 0, 0, 0, 363, 365, 5, 139, 0, 0, 364, 366, 5, 131, 0, 0, 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 3, 206, 103, 0, 368, 363, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 17, 1, 0, 0, 0, 370, 371, 5, 131, 0, 0, 371, 372, 3, 206, 103, 0, 372, 19, 1, 0, 0, 0, 373, 375, 5, 122, 0, 0, 374, 376, 5, 131, 0, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 3, 206, 103, 0, 378, 21, 1, 0, 0, 0, 379, 381, 5, 52, 0, 0, 380, 382, 5, 143, 0, 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 387, 5, 86, 0, 0, 384, 385, 5, 82, 0, 0, 385, 386, 5, 104, 0, 0, 386, 388, 5, 72, 0, 0, 387, 384, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 392, 1, 0, 0, 0, 389, 390, 3, 182, 91, 0, 390, 391, 5, 2, 0, 0, 391, 393, 1, 0, 0, 0, 392, 389, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 395, 3, 196, 98, 0, 395, 396, 5, 109, 0, 0, 396, 397, 3, 184, 92, 0, 397, 398, 5, 3, 0, 0, 398, 403, 3, 24, 12, 0, 399, 400, 5, 5, 0, 0, 400, 402, 3, 24, 12, 0, 401, 399, 1, 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 409, 5, 4, 0, 0, 407, 408, 5, 151, 0, 0, 408, 410, 3, 68, 34, 0, 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 23, 1, 0, 0, 0, 411, 414, 3, 190, 95, 0, 412, 414, 3, 68, 34, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 416, 5, 47, 0, 0, 416, 418, 3, 192, 96, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 421, 3, 140, 70, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 25, 1, 0, 0, 0, 422, 423, 5, 153, 0, 0, 423, 426, 5, 188, 0, 0, 424, 426, 5, 134, 0, 0, 425, 422, 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 27, 1, 0, 0, 0, 427, 429, 5, 52, 0, 0, 428, 430, 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 435, 5, 135, 0, 0, 432, 433, 5, 82, 0, 0, 433, 434, 5, 104, 0, 0, 434, 436, 5, 72, 0, 0, 435, 432, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, 91, 0, 438, 439, 5, 2, 0, 0, 439, 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, 444, 5, 3, 0, 0, 444, 449, 3, 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, 3, 30, 15, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 453, 5, 5, 0, 0, 453, 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, 455, 458, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 459, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, 3, 26, 13, 0, 461, 462, 5, 5, 0, 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, 0, 0, 0, 464, 467, 1, 0, 0, 0, 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 473, 1, 0, 0, 0, 470, 471, 5, 35, 0, 0, 471, 473, 3, 84, 42, 0, 472, 443, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, 0, 0, 474, 476, 3, 190, 95, 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, 0, 479, 478, 1, 0, 0, 0, 480, 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482, 31, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, 176, 88, 0, 485, 484, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 487, 485, 1, 0, 0, 0, 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, 490, 491, 3, 36, 18, 0, 491, 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, 494, 5, 3, 0, 0, 494, 495, 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, 3, 36, 18, 0, 497, 498, 5, 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, 0, 0, 0, 499, 493, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, 0, 501, 502, 5, 51, 0, 0, 502, 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 552, 1, 0, 0, 0, 505, 506, 5, 115, 0, 0, 506, 508, 5, 97, 0, 0, 507, 509, 3, 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 511, 1, 0, 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 38, 0, 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, 517, 5, 104, 0, 0, 517, 520, 5, 106, 0, 0, 518, 520, 5, 143, 0, 0, 519, 516, 1, 0, 0, 0, 519, 518, 1, 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, 3, 42, 21, 0, 522, 521, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, 0, 0, 0, 524, 525, 5, 46, 0, 0, 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, 34, 0, 527, 528, 5, 4, 0, 0, 528, 553, 1, 0, 0, 0, 529, 536, 5, 58, 0, 0, 530, 537, 3, 36, 18, 0, 531, 537, 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, 533, 534, 3, 68, 34, 0, 534, 535, 5, 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, 530, 1, 0, 0, 0, 536, 531, 1, 0, 0, 0, 536, 532, 1, 0, 0, 0, 537, 553, 1, 0, 0, 0, 538, 539, 5, 47, 0, 0, 539, 553, 3, 192, 96, 0, 540, 553, 3, 40, 20, 0, 541, 542, 5, 172, 0, 0, 542, 544, 5, 173, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 5, 35, 0, 0, 546, 547, 5, 3, 0, 0, 547, 548, 3, 68, 34, 0, 548, 550, 5, 4, 0, 0, 549, 551, 7, 3, 0, 0, 550, 549, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, 553, 1, 0, 0, 0, 552, 505, 1, 0, 0, 0, 552, 519, 1, 0, 0, 0, 552, 524, 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552, 538, 1, 0, 0, 0, 552, 540, 1, 0, 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1, 0, 0, 0, 554, 556, 7, 4, 0, 0, 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 558, 5, 189, 0, 0, 558, 37, 1, 0, 0, 0, 559, 560, 5, 51, 0, 0, 560, 562, 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 600, 1, 0, 0, 0, 563, 564, 5, 115, 0, 0, 564, 567, 5, 97, 0, 0, 565, 567, 5, 143, 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12, 0, 570, 571, 5, 5, 0, 0, 571, 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0, 573, 576, 1, 0, 0, 0, 574, 572, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 577, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 577, 579, 5, 4, 0, 0, 578, 580, 3, 42, 21, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 601, 1, 0, 0, 0, 581, 582, 5, 46, 0, 0, 582, 583, 5, 3, 0, 0, 583, 584, 3, 68, 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, 1, 0, 0, 0, 586, 587, 5, 76, 0, 0, 587, 588, 5, 97, 0, 0, 588, 589, 5, 3, 0, 0, 589, 594, 3, 190, 95, 0, 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, 95, 0, 592, 590, 1, 0, 0, 0, 593, 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, 598, 5, 4, 0, 0, 598, 599, 3, 40, 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, 1, 0, 0, 0, 600, 581, 1, 0, 0, 0, 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, 0, 0, 602, 603, 5, 119, 0, 0, 603, 615, 3, 194, 97, 0, 604, 605, 5, 3, 0, 0, 605, 610, 3, 190, 95, 0, 606, 607, 5, 5, 0, 0, 607, 609, 3, 190, 95, 0, 608, 606, 1, 0, 0, 0, 609, 612, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 613, 1, 0, 0, 0, 612, 610, 1, 0, 0, 0, 613, 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0, 615, 604, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617, 618, 5, 109, 0, 0, 618, 625, 7, 5, 0, 0, 619, 620, 5, 133, 0, 0, 620, 626, 7, 6, 0, 0, 621, 626, 5, 43, 0, 0, 622, 626, 5, 125, 0, 0, 623, 624, 5, 103, 0, 0, 624, 626, 5, 28, 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0, 0, 0, 625, 622, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0, 627, 628, 5, 101, 0, 0, 628, 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 633, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 642, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 634, 636, 5, 104, 0, 0, 635, 634, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 640, 5, 59, 0, 0, 638, 639, 5, 88, 0, 0, 639, 641, 7, 7, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 643, 1, 0, 0, 0, 642, 635, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 41, 1, 0, 0, 0, 644, 645, 5, 109, 0, 0, 645, 646, 5, 50, 0, 0, 646, 647, 7, 8, 0, 0, 647, 43, 1, 0, 0, 0, 648, 650, 5, 52, 0, 0, 649, 651, 7, 2, 0, 0, 650, 649, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 656, 5, 141, 0, 0, 653, 654, 5, 82, 0, 0, 654, 655, 5, 104, 0, 0, 655, 657, 5, 72, 0, 0, 656, 653, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 661, 1, 0, 0, 0, 658, 659, 3, 182, 91, 0, 659, 660, 5, 2, 0, 0, 660, 662, 1, 0, 0, 0, 661, 658, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 668, 3, 198, 99, 0, 664, 669, 5, 39, 0, 0, 665, 669, 5, 30, 0, 0, 666, 667, 5, 91, 0, 0, 667, 669, 5, 107, 0, 0, 668, 664, 1, 0, 0, 0, 668, 665, 1, 0, 0, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 684, 1, 0, 0, 0, 670, 685, 5, 61, 0, 0, 671, 685, 5, 90, 0, 0, 672, 682, 5, 144, 0, 0, 673, 674, 5, 107, 0, 0, 674, 679, 3, 190, 95, 0, 675, 676, 5, 5, 0, 0, 676, 678, 3, 190, 95, 0, 677, 675, 1, 0, 0, 0, 678, 681, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 683, 1, 0, 0, 0, 681, 679, 1, 0, 0, 0, 682, 673, 1, 0, 0, 0, 682, 683, 1, 0, 0, 0, 683, 685, 1, 0, 0, 0, 684, 670, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, 684, 672, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, 686, 687, 5, 109, 0, 0, 687, 691, 3, 184, 92, 0, 688, 689, 5, 75, 0, 0, 689, 690, 5, 66, 0, 0, 690, 692, 5, 129, 0, 0, 691, 688, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 695, 1, 0, 0, 0, 693, 694, 5, 150, 0, 0, 694, 696, 3, 68, 34, 0, 695, 693, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 697, 1, 0, 0, 0, 697, 706, 5, 40, 0, 0, 698, 703, 3, 106, 53, 0, 699, 703, 3, 74, 37, 0, 700, 703, 3, 60, 30, 0, 701, 703, 3, 84, 42, 0, 702, 698, 1, 0, 0, 0, 702, 699, 1, 0, 0, 0, 702, 700, 1, 0, 0, 0, 702, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 705, 5, 1, 0, 0, 705, 707, 1, 0, 0, 0, 706, 702, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 1, 0, 0, 0, 710, 711, 5, 68, 0, 0, 711, 45, 1, 0, 0, 0, 712, 714, 5, 52, 0, 0, 713, 715, 7, 2, 0, 0, 714, 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 720, 5, 148, 0, 0, 717, 718, 5, 82, 0, 0, 718, 719, 5, 104, 0, 0, 719, 721, 5, 72, 0, 0, 720, 717, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 725, 1, 0, 0, 0, 722, 723, 3, 182, 91, 0, 723, 724, 5, 2, 0, 0, 724, 726, 1, 0, 0, 0, 725, 722, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727, 739, 3, 200, 100, 0, 728, 729, 5, 3, 0, 0, 729, 734, 3, 190, 95, 0, 730, 731, 5, 5, 0, 0, 731, 733, 3, 190, 95, 0, 732, 730, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 737, 738, 5, 4, 0, 0, 738, 740, 1, 0, 0, 0, 739, 728, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 742, 5, 35, 0, 0, 742, 743, 3, 84, 42, 0, 743, 47, 1, 0, 0, 0, 744, 745, 5, 52, 0, 0, 745, 746, 5, 149, 0, 0, 746, 750, 5, 135, 0, 0, 747, 748, 5, 82, 0, 0, 748, 749, 5, 104, 0, 0, 749, 751, 5, 72, 0, 0, 750, 747, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 755, 1, 0, 0, 0, 752, 753, 3, 182, 91, 0, 753, 754, 5, 2, 0, 0, 754, 756, 1, 0, 0, 0, 755, 752, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 3, 184, 92, 0, 758, 759, 5, 145, 0, 0, 759, 771, 3, 202, 101, 0, 760, 761, 5, 3, 0, 0, 761, 766, 3, 170, 85, 0, 762, 763, 5, 5, 0, 0, 763, 765, 3, 170, 85, 0, 764, 762, 1, 0, 0, 0, 765, 768, 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 766, 767, 1, 0, 0, 0, 767, 769, 1, 0, 0, 0, 768, 766, 1, 0, 0, 0, 769, 770, 5, 4, 0, 0, 770, 772, 1, 0, 0, 0, 771, 760, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 49, 1, 0, 0, 0, 773, 775, 5, 152, 0, 0, 774, 776, 5, 118, 0, 0, 775, 774, 1, 0, 0, 0, 775, 776, 1, 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 778, 3, 52, 26, 0, 778, 779, 5, 35, 0, 0, 779, 780, 5, 3, 0, 0, 780, 781, 3, 84, 42, 0, 781, 791, 5, 4, 0, 0, 782, 783, 5, 5, 0, 0, 783, 784, 3, 52, 26, 0, 784, 785, 5, 35, 0, 0, 785, 786, 5, 3, 0, 0, 786, 787, 3, 84, 42, 0, 787, 788, 5, 4, 0, 0, 788, 790, 1, 0, 0, 0, 789, 782, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 806, 3, 184, 92, 0, 795, 796, 5, 3, 0, 0, 796, 801, 3, 190, 95, 0, 797, 798, 5, 5, 0, 0, 798, 800, 3, 190, 95, 0, 799, 797, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 804, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804, 805, 5, 4, 0, 0, 805, 807, 1, 0, 0, 0, 806, 795, 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 53, 1, 0, 0, 0, 808, 809, 3, 52, 26, 0, 809, 810, 5, 35, 0, 0, 810, 811, 5, 3, 0, 0, 811, 812, 3, 162, 81, 0, 812, 814, 5, 142, 0, 0, 813, 815, 5, 31, 0, 0, 814, 813, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 3, 164, 82, 0, 817, 818, 5, 4, 0, 0, 818, 55, 1, 0, 0, 0, 819, 831, 3, 184, 92, 0, 820, 821, 5, 3, 0, 0, 821, 826, 3, 190, 95, 0, 822, 823, 5, 5, 0, 0, 823, 825, 3, 190, 95, 0, 824, 822, 1, 0, 0, 0, 825, 828, 1, 0, 0, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 1, 0, 0, 0, 828, 826, 1, 0, 0, 0, 829, 830, 5, 4, 0, 0, 830, 832, 1, 0, 0, 0, 831, 820, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 834, 5, 35, 0, 0, 834, 835, 5, 3, 0, 0, 835, 836, 3, 84, 42, 0, 836, 837, 5, 4, 0, 0, 837, 57, 1, 0, 0, 0, 838, 847, 5, 126, 0, 0, 839, 848, 5, 7, 0, 0, 840, 845, 3, 68, 34, 0, 841, 843, 5, 35, 0, 0, 842, 841, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 846, 3, 172, 86, 0, 845, 842, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 839, 1, 0, 0, 0, 847, 840, 1, 0, 0, 0, 848, 862, 1, 0, 0, 0, 849, 858, 5, 5, 0, 0, 850, 859, 5, 7, 0, 0, 851, 856, 3, 68, 34, 0, 852, 854, 5, 35, 0, 0, 853, 852, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854, 855, 1, 0, 0, 0, 855, 857, 3, 172, 86, 0, 856, 853, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 850, 1, 0, 0, 0, 858, 851, 1, 0, 0, 0, 859, 861, 1, 0, 0, 0, 860, 849, 1, 0, 0, 0, 861, 864, 1, 0, 0, 0, 862, 860, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, 59, 1, 0, 0, 0, 864, 862, 1, 0, 0, 0, 865, 867, 3, 50, 25, 0, 866, 865, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 869, 5, 61, 0, 0, 869, 870, 5, 77, 0, 0, 870, 873, 3, 112, 56, 0, 871, 872, 5, 151, 0, 0, 872, 874, 3, 68, 34, 0, 873, 871, 1, 0, 0, 0, 873, 874, 1, 0, 0, 0, 874, 876, 1, 0, 0, 0, 875, 877, 3, 58, 29, 0, 876, 875, 1, 0, 0, 0, 876, 877, 1, 0, 0, 0, 877, 61, 1, 0, 0, 0, 878, 880, 3, 50, 25, 0, 879, 878, 1, 0, 0, 0, 879, 880, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, 5, 61, 0, 0, 882, 883, 5, 77, 0, 0, 883, 886, 3, 112, 56, 0, 884, 885, 5, 151, 0, 0, 885, 887, 3, 68, 34, 0, 886, 884, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 892, 1, 0, 0, 0, 888, 890, 3, 134, 67, 0, 889, 888, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 893, 3, 136, 68, 0, 892, 889, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, 896, 3, 58, 29, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 63, 1, 0, 0, 0, 897, 899, 5, 63, 0, 0, 898, 900, 5, 57, 0, 0, 899, 898, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, 901, 902, 3, 182, 91, 0, 902, 65, 1, 0, 0, 0, 903, 904, 5, 65, 0, 0, 904, 907, 7, 9, 0, 0, 905, 906, 5, 82, 0, 0, 906, 908, 5, 72, 0, 0, 907, 905, 1, 0, 0, 0, 907, 908, 1, 0, 0, 0, 908, 912, 1, 0, 0, 0, 909, 910, 3, 182, 91, 0, 910, 911, 5, 2, 0, 0, 911, 913, 1, 0, 0, 0, 912, 909, 1, 0, 0, 0, 912, 913, 1, 0, 0, 0, 913, 914, 1, 0, 0, 0, 914, 915, 3, 228, 114, 0, 915, 67, 1, 0, 0, 0, 916, 917, 6, 34, -1, 0, 917, 1006, 3, 72, 36, 0, 918, 1006, 5, 190, 0, 0, 919, 1006, 5, 191, 0, 0, 920, 921, 3, 182, 91, 0, 921, 922, 5, 2, 0, 0, 922, 924, 1, 0, 0, 0, 923, 920, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, 924, 925, 1, 0, 0, 0, 925, 926, 3, 184, 92, 0, 926, 927, 5, 2, 0, 0, 927, 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 930, 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931, 932, 3, 166, 83, 0, 932, 933, 3, 68, 34, 21, 933, 1006, 1, 0, 0, 0, 934, 935, 3, 180, 90, 0, 935, 948, 5, 3, 0, 0, 936, 938, 5, 64, 0, 0, 937, 936, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68, 34, 0, 940, 941, 5, 5, 0, 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0, 0, 943, 946, 1, 0, 0, 0, 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 949, 1, 0, 0, 0, 946, 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937, 1, 0, 0, 0, 948, 947, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, 5, 4, 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0, 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957, 958, 5, 3, 0, 0, 958, 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962, 3, 68, 34, 0, 961, 959, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, 1, 0, 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 5, 4, 0, 0, 967, 1006, 1, 0, 0, 0, 968, 969, 5, 45, 0, 0, 969, 970, 5, 3, 0, 0, 970, 971, 3, 68, 34, 0, 971, 972, 5, 35, 0, 0, 972, 973, 3, 32, 16, 0, 973, 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977, 5, 104, 0, 0, 976, 975, 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 980, 5, 72, 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0, 983, 984, 5, 4, 0, 0, 984, 1006, 1, 0, 0, 0, 985, 987, 5, 44, 0, 0, 986, 988, 3, 68, 34, 0, 987, 986, 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994, 1, 0, 0, 0, 989, 990, 5, 150, 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5, 138, 0, 0, 992, 993, 3, 68, 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 1000, 1, 0, 0, 0, 998, 999, 5, 67, 0, 0, 999, 1001, 3, 68, 34, 0, 1000, 998, 1, 0, 0, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 1003, 5, 68, 0, 0, 1003, 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35, 0, 1005, 916, 1, 0, 0, 0, 1005, 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0, 1005, 928, 1, 0, 0, 0, 1005, 931, 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005, 957, 1, 0, 0, 0, 1005, 968, 1, 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985, 1, 0, 0, 0, 1005, 1004, 1, 0, 0, 0, 1006, 1126, 1, 0, 0, 0, 1007, 1008, 10, 20, 0, 0, 1008, 1009, 5, 13, 0, 0, 1009, 1125, 3, 68, 34, 21, 1010, 1011, 10, 19, 0, 0, 1011, 1012, 7, 10, 0, 0, 1012, 1125, 3, 68, 34, 20, 1013, 1014, 10, 18, 0, 0, 1014, 1015, 7, 11, 0, 0, 1015, 1125, 3, 68, 34, 19, 1016, 1017, 10, 17, 0, 0, 1017, 1018, 7, 4, 0, 0, 1018, 1125, 3, 68, 34, 18, 1019, 1020, 10, 16, 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1125, 3, 68, 34, 17, 1022, 1023, 10, 15, 0, 0, 1023, 1024, 7, 13, 0, 0, 1024, 1125, 3, 68, 34, 16, 1025, 1041, 10, 14, 0, 0, 1026, 1042, 5, 6, 0, 0, 1027, 1042, 5, 24, 0, 0, 1028, 1042, 5, 25, 0, 0, 1029, 1042, 5, 26, 0, 0, 1030, 1042, 5, 94, 0, 0, 1031, 1032, 5, 94, 0, 0, 1032, 1042, 5, 104, 0, 0, 1033, 1035, 5, 104, 0, 0, 1034, 1033, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, 1042, 5, 85, 0, 0, 1037, 1042, 5, 99, 0, 0, 1038, 1042, 5, 79, 0, 0, 1039, 1042, 5, 101, 0, 0, 1040, 1042, 5, 120, 0, 0, 1041, 1026, 1, 0, 0, 0, 1041, 1027, 1, 0, 0, 0, 1041, 1028, 1, 0, 0, 0, 1041, 1029, 1, 0, 0, 0, 1041, 1030, 1, 0, 0, 0, 1041, 1031, 1, 0, 0, 0, 1041, 1034, 1, 0, 0, 0, 1041, 1037, 1, 0, 0, 0, 1041, 1038, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1040, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1125, 3, 68, 34, 15, 1044, 1045, 10, 12, 0, 0, 1045, 1046, 5, 34, 0, 0, 1046, 1125, 3, 68, 34, 13, 1047, 1048, 10, 11, 0, 0, 1048, 1049, 5, 110, 0, 0, 1049, 1125, 3, 68, 34, 12, 1050, 1052, 10, 4, 0, 0, 1051, 1053, 5, 104, 0, 0, 1052, 1051, 1, 0, 0, 0, 1052, 1053, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, 5, 41, 0, 0, 1055, 1056, 3, 68, 34, 0, 1056, 1057, 5, 34, 0, 0, 1057, 1058, 3, 68, 34, 5, 1058, 1125, 1, 0, 0, 0, 1059, 1061, 10, 13, 0, 0, 1060, 1062, 5, 104, 0, 0, 1061, 1060, 1, 0, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, 1, 0, 0, 0, 1063, 1102, 5, 85, 0, 0, 1064, 1074, 5, 3, 0, 0, 1065, 1075, 3, 84, 42, 0, 1066, 1071, 3, 68, 34, 0, 1067, 1068, 5, 5, 0, 0, 1068, 1070, 3, 68, 34, 0, 1069, 1067, 1, 0, 0, 0, 1070, 1073, 1, 0, 0, 0, 1071, 1069, 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1071, 1, 0, 0, 0, 1074, 1065, 1, 0, 0, 0, 1074, 1066, 1, 0, 0, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1103, 5, 4, 0, 0, 1077, 1078, 3, 182, 91, 0, 1078, 1079, 5, 2, 0, 0, 1079, 1081, 1, 0, 0, 0, 1080, 1077, 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1082, 1, 0, 0, 0, 1082, 1103, 3, 184, 92, 0, 1083, 1084, 3, 182, 91, 0, 1084, 1085, 5, 2, 0, 0, 1085, 1087, 1, 0, 0, 0, 1086, 1083, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1088, 1, 0, 0, 0, 1088, 1089, 3, 226, 113, 0, 1089, 1098, 5, 3, 0, 0, 1090, 1095, 3, 68, 34, 0, 1091, 1092, 5, 5, 0, 0, 1092, 1094, 3, 68, 34, 0, 1093, 1091, 1, 0, 0, 0, 1094, 1097, 1, 0, 0, 0, 1095, 1093, 1, 0, 0, 0, 1095, 1096, 1, 0, 0, 0, 1096, 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1098, 1090, 1, 0, 0, 0, 1098, 1099, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1101, 5, 4, 0, 0, 1101, 1103, 1, 0, 0, 0, 1102, 1064, 1, 0, 0, 0, 1102, 1080, 1, 0, 0, 0, 1102, 1086, 1, 0, 0, 0, 1103, 1125, 1, 0, 0, 0, 1104, 1105, 10, 7, 0, 0, 1105, 1106, 5, 47, 0, 0, 1106, 1125, 3, 192, 96, 0, 1107, 1109, 10, 6, 0, 0, 1108, 1110, 5, 104, 0, 0, 1109, 1108, 1, 0, 0, 0, 1109, 1110, 1, 0, 0, 0, 1110, 1111, 1, 0, 0, 0, 1111, 1112, 7, 14, 0, 0, 1112, 1115, 3, 68, 34, 0, 1113, 1114, 5, 69, 0, 0, 1114, 1116, 3, 68, 34, 0, 1115, 1113, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1125, 1, 0, 0, 0, 1117, 1122, 10, 5, 0, 0, 1118, 1123, 5, 95, 0, 0, 1119, 1123, 5, 105, 0, 0, 1120, 1121, 5, 104, 0, 0, 1121, 1123, 5, 106, 0, 0, 1122, 1118, 1, 0, 0, 0, 1122, 1119, 1, 0, 0, 0, 1122, 1120, 1, 0, 0, 0, 1123, 1125, 1, 0, 0, 0, 1124, 1007, 1, 0, 0, 0, 1124, 1010, 1, 0, 0, 0, 1124, 1013, 1, 0, 0, 0, 1124, 1016, 1, 0, 0, 0, 1124, 1019, 1, 0, 0, 0, 1124, 1022, 1, 0, 0, 0, 1124, 1025, 1, 0, 0, 0, 1124, 1044, 1, 0, 0, 0, 1124, 1047, 1, 0, 0, 0, 1124, 1050, 1, 0, 0, 0, 1124, 1059, 1, 0, 0, 0, 1124, 1104, 1, 0, 0, 0, 1124, 1107, 1, 0, 0, 0, 1124, 1117, 1, 0, 0, 0, 1125, 1128, 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 69, 1, 0, 0, 0, 1128, 1126, 1, 0, 0, 0, 1129, 1130, 5, 117, 0, 0, 1130, 1135, 5, 3, 0, 0, 1131, 1136, 5, 83, 0, 0, 1132, 1133, 7, 15, 0, 0, 1133, 1134, 5, 5, 0, 0, 1134, 1136, 3, 168, 84, 0, 1135, 1131, 1, 0, 0, 0, 1135, 1132, 1, 0, 0, 0, 1136, 1137, 1, 0, 0, 0, 1137, 1138, 5, 4, 0, 0, 1138, 71, 1, 0, 0, 0, 1139, 1140, 7, 16, 0, 0, 1140, 73, 1, 0, 0, 0, 1141, 1143, 3, 50, 25, 0, 1142, 1141, 1, 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1149, 1, 0, 0, 0, 1144, 1150, 5, 90, 0, 0, 1145, 1150, 5, 124, 0, 0, 1146, 1147, 5, 90, 0, 0, 1147, 1148, 5, 110, 0, 0, 1148, 1150, 7, 8, 0, 0, 1149, 1144, 1, 0, 0, 0, 1149, 1145, 1, 0, 0, 0, 1149, 1146, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1155, 5, 93, 0, 0, 1152, 1153, 3, 182, 91, 0, 1153, 1154, 5, 2, 0, 0, 1154, 1156, 1, 0, 0, 0, 1155, 1152, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1160, 3, 184, 92, 0, 1158, 1159, 5, 35, 0, 0, 1159, 1161, 3, 208, 104, 0, 1160, 1158, 1, 0, 0, 0, 1160, 1161, 1, 0, 0, 0, 1161, 1173, 1, 0, 0, 0, 1162, 1163, 5, 3, 0, 0, 1163, 1168, 3, 190, 95, 0, 1164, 1165, 5, 5, 0, 0, 1165, 1167, 3, 190, 95, 0, 1166, 1164, 1, 0, 0, 0, 1167, 1170, 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, 1171, 1172, 5, 4, 0, 0, 1172, 1174, 1, 0, 0, 0, 1173, 1162, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1206, 1, 0, 0, 0, 1175, 1176, 5, 147, 0, 0, 1176, 1177, 5, 3, 0, 0, 1177, 1182, 3, 68, 34, 0, 1178, 1179, 5, 5, 0, 0, 1179, 1181, 3, 68, 34, 0, 1180, 1178, 1, 0, 0, 0, 1181, 1184, 1, 0, 0, 0, 1182, 1180, 1, 0, 0, 0, 1182, 1183, 1, 0, 0, 0, 1183, 1185, 1, 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1185, 1200, 5, 4, 0, 0, 1186, 1187, 5, 5, 0, 0, 1187, 1188, 5, 3, 0, 0, 1188, 1193, 3, 68, 34, 0, 1189, 1190, 5, 5, 0, 0, 1190, 1192, 3, 68, 34, 0, 1191, 1189, 1, 0, 0, 0, 1192, 1195, 1, 0, 0, 0, 1193, 1191, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1196, 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1196, 1197, 5, 4, 0, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1186, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1207, 1, 0, 0, 0, 1202, 1200, 1, 0, 0, 0, 1203, 1207, 3, 84, 42, 0, 1204, 1205, 5, 58, 0, 0, 1205, 1207, 5, 147, 0, 0, 1206, 1175, 1, 0, 0, 0, 1206, 1203, 1, 0, 0, 0, 1206, 1204, 1, 0, 0, 0, 1207, 1209, 1, 0, 0, 0, 1208, 1210, 3, 76, 38, 0, 1209, 1208, 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, 1212, 1, 0, 0, 0, 1211, 1213, 3, 58, 29, 0, 1212, 1211, 1, 0, 0, 0, 1212, 1213, 1, 0, 0, 0, 1213, 75, 1, 0, 0, 0, 1214, 1215, 5, 109, 0, 0, 1215, 1230, 5, 50, 0, 0, 1216, 1217, 5, 3, 0, 0, 1217, 1222, 3, 24, 12, 0, 1218, 1219, 5, 5, 0, 0, 1219, 1221, 3, 24, 12, 0, 1220, 1218, 1, 0, 0, 0, 1221, 1224, 1, 0, 0, 0, 1222, 1220, 1, 0, 0, 0, 1222, 1223, 1, 0, 0, 0, 1223, 1225, 1, 0, 0, 0, 1224, 1222, 1, 0, 0, 0, 1225, 1228, 5, 4, 0, 0, 1226, 1227, 5, 151, 0, 0, 1227, 1229, 3, 68, 34, 0, 1228, 1226, 1, 0, 0, 0, 1228, 1229, 1, 0, 0, 0, 1229, 1231, 1, 0, 0, 0, 1230, 1216, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1232, 1, 0, 0, 0, 1232, 1259, 5, 186, 0, 0, 1233, 1260, 5, 187, 0, 0, 1234, 1235, 5, 144, 0, 0, 1235, 1238, 5, 133, 0, 0, 1236, 1239, 3, 190, 95, 0, 1237, 1239, 3, 108, 54, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1237, 1, 0, 0, 0, 1239, 1240, 1, 0, 0, 0, 1240, 1241, 5, 6, 0, 0, 1241, 1252, 3, 68, 34, 0, 1242, 1245, 5, 5, 0, 0, 1243, 1246, 3, 190, 95, 0, 1244, 1246, 3, 108, 54, 0, 1245, 1243, 1, 0, 0, 0, 1245, 1244, 1, 0, 0, 0, 1246, 1247, 1, 0, 0, 0, 1247, 1248, 5, 6, 0, 0, 1248, 1249, 3, 68, 34, 0, 1249, 1251, 1, 0, 0, 0, 1250, 1242, 1, 0, 0, 0, 1251, 1254, 1, 0, 0, 0, 1252, 1250, 1, 0, 0, 0, 1252, 1253, 1, 0, 0, 0, 1253, 1257, 1, 0, 0, 0, 1254, 1252, 1, 0, 0, 0, 1255, 1256, 5, 151, 0, 0, 1256, 1258, 3, 68, 34, 0, 1257, 1255, 1, 0, 0, 0, 1257, 1258, 1, 0, 0, 0, 1258, 1260, 1, 0, 0, 0, 1259, 1233, 1, 0, 0, 0, 1259, 1234, 1, 0, 0, 0, 1260, 77, 1, 0, 0, 0, 1261, 1265, 5, 114, 0, 0, 1262, 1263, 3, 182, 91, 0, 1263, 1264, 5, 2, 0, 0, 1264, 1266, 1, 0, 0, 0, 1265, 1262, 1, 0, 0, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1267, 1, 0, 0, 0, 1267, 1274, 3, 204, 102, 0, 1268, 1269, 5, 6, 0, 0, 1269, 1275, 3, 80, 40, 0, 1270, 1271, 5, 3, 0, 0, 1271, 1272, 3, 80, 40, 0, 1272, 1273, 5, 4, 0, 0, 1273, 1275, 1, 0, 0, 0, 1274, 1268, 1, 0, 0, 0, 1274, 1270, 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, 79, 1, 0, 0, 0, 1276, 1280, 3, 36, 18, 0, 1277, 1280, 3, 176, 88, 0, 1278, 1280, 5, 192, 0, 0, 1279, 1276, 1, 0, 0, 0, 1279, 1277, 1, 0, 0, 0, 1279, 1278, 1, 0, 0, 0, 1280, 81, 1, 0, 0, 0, 1281, 1292, 5, 121, 0, 0, 1282, 1293, 3, 192, 96, 0, 1283, 1284, 3, 182, 91, 0, 1284, 1285, 5, 2, 0, 0, 1285, 1287, 1, 0, 0, 0, 1286, 1283, 1, 0, 0, 0, 1286, 1287, 1, 0, 0, 0, 1287, 1290, 1, 0, 0, 0, 1288, 1291, 3, 184, 92, 0, 1289, 1291, 3, 196, 98, 0, 1290, 1288, 1, 0, 0, 0, 1290, 1289, 1, 0, 0, 0, 1291, 1293, 1, 0, 0, 0, 1292, 1282, 1, 0, 0, 0, 1292, 1286, 1, 0, 0, 0, 1292, 1293, 1, 0, 0, 0, 1293, 83, 1, 0, 0, 0, 1294, 1296, 3, 132, 66, 0, 1295, 1294, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 1297, 1, 0, 0, 0, 1297, 1303, 3, 88, 44, 0, 1298, 1299, 3, 104, 52, 0, 1299, 1300, 3, 88, 44, 0, 1300, 1302, 1, 0, 0, 0, 1301, 1298, 1, 0, 0, 0, 1302, 1305, 1, 0, 0, 0, 1303, 1301, 1, 0, 0, 0, 1303, 1304, 1, 0, 0, 0, 1304, 1307, 1, 0, 0, 0, 1305, 1303, 1, 0, 0, 0, 1306, 1308, 3, 134, 67, 0, 1307, 1306, 1, 0, 0, 0, 1307, 1308, 1, 0, 0, 0, 1308, 1310, 1, 0, 0, 0, 1309, 1311, 3, 136, 68, 0, 1310, 1309, 1, 0, 0, 0, 1310, 1311, 1, 0, 0, 0, 1311, 85, 1, 0, 0, 0, 1312, 1319, 3, 96, 48, 0, 1313, 1314, 3, 100, 50, 0, 1314, 1315, 3, 96, 48, 0, 1315, 1316, 3, 102, 51, 0, 1316, 1318, 1, 0, 0, 0, 1317, 1313, 1, 0, 0, 0, 1318, 1321, 1, 0, 0, 0, 1319, 1317, 1, 0, 0, 0, 1319, 1320, 1, 0, 0, 0, 1320, 87, 1, 0, 0, 0, 1321, 1319, 1, 0, 0, 0, 1322, 1324, 5, 132, 0, 0, 1323, 1325, 7, 17, 0, 0, 1324, 1323, 1, 0, 0, 0, 1324, 1325, 1, 0, 0, 0, 1325, 1326, 1, 0, 0, 0, 1326, 1331, 3, 98, 49, 0, 1327, 1328, 5, 5, 0, 0, 1328, 1330, 3, 98, 49, 0, 1329, 1327, 1, 0, 0, 0, 1330, 1333, 1, 0, 0, 0, 1331, 1329, 1, 0, 0, 0, 1331, 1332, 1, 0, 0, 0, 1332, 1346, 1, 0, 0, 0, 1333, 1331, 1, 0, 0, 0, 1334, 1344, 5, 77, 0, 0, 1335, 1340, 3, 96, 48, 0, 1336, 1337, 5, 5, 0, 0, 1337, 1339, 3, 96, 48, 0, 1338, 1336, 1, 0, 0, 0, 1339, 1342, 1, 0, 0, 0, 1340, 1338, 1, 0, 0, 0, 1340, 1341, 1, 0, 0, 0, 1341, 1345, 1, 0, 0, 0, 1342, 1340, 1, 0, 0, 0, 1343, 1345, 3, 86, 43, 0, 1344, 1335, 1, 0, 0, 0, 1344, 1343, 1, 0, 0, 0, 1345, 1347, 1, 0, 0, 0, 1346, 1334, 1, 0, 0, 0, 1346, 1347, 1, 0, 0, 0, 1347, 1350, 1, 0, 0, 0, 1348, 1349, 5, 151, 0, 0, 1349, 1351, 3, 68, 34, 0, 1350, 1348, 1, 0, 0, 0, 1350, 1351, 1, 0, 0, 0, 1351, 1366, 1, 0, 0, 0, 1352, 1353, 5, 80, 0, 0, 1353, 1354, 5, 42, 0, 0, 1354, 1359, 3, 68, 34, 0, 1355, 1356, 5, 5, 0, 0, 1356, 1358, 3, 68, 34, 0, 1357, 1355, 1, 0, 0, 0, 1358, 1361, 1, 0, 0, 0, 1359, 1357, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, 1364, 1, 0, 0, 0, 1361, 1359, 1, 0, 0, 0, 1362, 1363, 5, 81, 0, 0, 1363, 1365, 3, 68, 34, 0, 1364, 1362, 1, 0, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, 1367, 1, 0, 0, 0, 1366, 1352, 1, 0, 0, 0, 1366, 1367, 1, 0, 0, 0, 1367, 1382, 1, 0, 0, 0, 1368, 1369, 5, 177, 0, 0, 1369, 1370, 3, 214, 107, 0, 1370, 1371, 5, 35, 0, 0, 1371, 1379, 3, 118, 59, 0, 1372, 1373, 5, 5, 0, 0, 1373, 1374, 3, 214, 107, 0, 1374, 1375, 5, 35, 0, 0, 1375, 1376, 3, 118, 59, 0, 1376, 1378, 1, 0, 0, 0, 1377, 1372, 1, 0, 0, 0, 1378, 1381, 1, 0, 0, 0, 1379, 1377, 1, 0, 0, 0, 1379, 1380, 1, 0, 0, 0, 1380, 1383, 1, 0, 0, 0, 1381, 1379, 1, 0, 0, 0, 1382, 1368, 1, 0, 0, 0, 1382, 1383, 1, 0, 0, 0, 1383, 1413, 1, 0, 0, 0, 1384, 1385, 5, 147, 0, 0, 1385, 1386, 5, 3, 0, 0, 1386, 1391, 3, 68, 34, 0, 1387, 1388, 5, 5, 0, 0, 1388, 1390, 3, 68, 34, 0, 1389, 1387, 1, 0, 0, 0, 1390, 1393, 1, 0, 0, 0, 1391, 1389, 1, 0, 0, 0, 1391, 1392, 1, 0, 0, 0, 1392, 1394, 1, 0, 0, 0, 1393, 1391, 1, 0, 0, 0, 1394, 1409, 5, 4, 0, 0, 1395, 1396, 5, 5, 0, 0, 1396, 1397, 5, 3, 0, 0, 1397, 1402, 3, 68, 34, 0, 1398, 1399, 5, 5, 0, 0, 1399, 1401, 3, 68, 34, 0, 1400, 1398, 1, 0, 0, 0, 1401, 1404, 1, 0, 0, 0, 1402, 1400, 1, 0, 0, 0, 1402, 1403, 1, 0, 0, 0, 1403, 1405, 1, 0, 0, 0, 1404, 1402, 1, 0, 0, 0, 1405, 1406, 5, 4, 0, 0, 1406, 1408, 1, 0, 0, 0, 1407, 1395, 1, 0, 0, 0, 1408, 1411, 1, 0, 0, 0, 1409, 1407, 1, 0, 0, 0, 1409, 1410, 1, 0, 0, 0, 1410, 1413, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1412, 1322, 1, 0, 0, 0, 1412, 1384, 1, 0, 0, 0, 1413, 89, 1, 0, 0, 0, 1414, 1415, 3, 84, 42, 0, 1415, 91, 1, 0, 0, 0, 1416, 1418, 3, 132, 66, 0, 1417, 1416, 1, 0, 0, 0, 1417, 1418, 1, 0, 0, 0, 1418, 1419, 1, 0, 0, 0, 1419, 1421, 3, 88, 44, 0, 1420, 1422, 3, 134, 67, 0, 1421, 1420, 1, 0, 0, 0, 1421, 1422, 1, 0, 0, 0, 1422, 1424, 1, 0, 0, 0, 1423, 1425, 3, 136, 68, 0, 1424, 1423, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 93, 1, 0, 0, 0, 1426, 1428, 3, 132, 66, 0, 1427, 1426, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 1429, 1, 0, 0, 0, 1429, 1439, 3, 88, 44, 0, 1430, 1432, 5, 142, 0, 0, 1431, 1433, 5, 31, 0, 0, 1432, 1431, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1437, 1, 0, 0, 0, 1434, 1437, 5, 92, 0, 0, 1435, 1437, 5, 70, 0, 0, 1436, 1430, 1, 0, 0, 0, 1436, 1434, 1, 0, 0, 0, 1436, 1435, 1, 0, 0, 0, 1437, 1438, 1, 0, 0, 0, 1438, 1440, 3, 88, 44, 0, 1439, 1436, 1, 0, 0, 0, 1440, 1441, 1, 0, 0, 0, 1441, 1439, 1, 0, 0, 0, 1441, 1442, 1, 0, 0, 0, 1442, 1444, 1, 0, 0, 0, 1443, 1445, 3, 134, 67, 0, 1444, 1443, 1, 0, 0, 0, 1444, 1445, 1, 0, 0, 0, 1445, 1447, 1, 0, 0, 0, 1446, 1448, 3, 136, 68, 0, 1447, 1446, 1, 0, 0, 0, 1447, 1448, 1, 0, 0, 0, 1448, 95, 1, 0, 0, 0, 1449, 1450, 3, 182, 91, 0, 1450, 1451, 5, 2, 0, 0, 1451, 1453, 1, 0, 0, 0, 1452, 1449, 1, 0, 0, 0, 1452, 1453, 1, 0, 0, 0, 1453, 1454, 1, 0, 0, 0, 1454, 1459, 3, 184, 92, 0, 1455, 1457, 5, 35, 0, 0, 1456, 1455, 1, 0, 0, 0, 1456, 1457, 1, 0, 0, 0, 1457, 1458, 1, 0, 0, 0, 1458, 1460, 3, 208, 104, 0, 1459, 1456, 1, 0, 0, 0, 1459, 1460, 1, 0, 0, 0, 1460, 1466, 1, 0, 0, 0, 1461, 1462, 5, 87, 0, 0, 1462, 1463, 5, 42, 0, 0, 1463, 1467, 3, 196, 98, 0, 1464, 1465, 5, 104, 0, 0, 1465, 1467, 5, 87, 0, 0, 1466, 1461, 1, 0, 0, 0, 1466, 1464, 1, 0, 0, 0, 1466, 1467, 1, 0, 0, 0, 1467, 1578, 1, 0, 0, 0, 1468, 1469, 3, 182, 91, 0, 1469, 1470, 5, 2, 0, 0, 1470, 1472, 1, 0, 0, 0, 1471, 1468, 1, 0, 0, 0, 1471, 1472, 1, 0, 0, 0, 1472, 1473, 1, 0, 0, 0, 1473, 1474, 3, 226, 113, 0, 1474, 1475, 5, 3, 0, 0, 1475, 1480, 3, 68, 34, 0, 1476, 1477, 5, 5, 0, 0, 1477, 1479, 3, 68, 34, 0, 1478, 1476, 1, 0, 0, 0, 1479, 1482, 1, 0, 0, 0, 1480, 1478, 1, 0, 0, 0, 1480, 1481, 1, 0, 0, 0, 1481, 1483, 1, 0, 0, 0, 1482, 1480, 1, 0, 0, 0, 1483, 1488, 5, 4, 0, 0, 1484, 1486, 5, 35, 0, 0, 1485, 1484, 1, 0, 0, 0, 1485, 1486, 1, 0, 0, 0, 1486, 1487, 1, 0, 0, 0, 1487, 1489, 3, 208, 104, 0, 1488, 1485, 1, 0, 0, 0, 1488, 1489, 1, 0, 0, 0, 1489, 1578, 1, 0, 0, 0, 1490, 1500, 5, 3, 0, 0, 1491, 1496, 3, 96, 48, 0, 1492, 1493, 5, 5, 0, 0, 1493, 1495, 3, 96, 48, 0, 1494, 1492, 1, 0, 0, 0, 1495, 1498, 1, 0, 0, 0, 1496, 1494, 1, 0, 0, 0, 1496, 1497, 1, 0, 0, 0, 1497, 1501, 1, 0, 0, 0, 1498, 1496, 1, 0, 0, 0, 1499, 1501, 3, 86, 43, 0, 1500, 1491, 1, 0, 0, 0, 1500, 1499, 1, 0, 0, 0, 1501, 1502, 1, 0, 0, 0, 1502, 1503, 5, 4, 0, 0, 1503, 1578, 1, 0, 0, 0, 1504, 1505, 5, 3, 0, 0, 1505, 1506, 3, 84, 42, 0, 1506, 1511, 5, 4, 0, 0, 1507, 1509, 5, 35, 0, 0, 1508, 1507, 1, 0, 0, 0, 1508, 1509, 1, 0, 0, 0, 1509, 1510, 1, 0, 0, 0, 1510, 1512, 3, 208, 104, 0, 1511, 1508, 1, 0, 0, 0, 1511, 1512, 1, 0, 0, 0, 1512, 1578, 1, 0, 0, 0, 1513, 1514, 3, 182, 91, 0, 1514, 1515, 5, 2, 0, 0, 1515, 1517, 1, 0, 0, 0, 1516, 1513, 1, 0, 0, 0, 1516, 1517, 1, 0, 0, 0, 1517, 1518, 1, 0, 0, 0, 1518, 1523, 3, 184, 92, 0, 1519, 1521, 5, 35, 0, 0, 1520, 1519, 1, 0, 0, 0, 1520, 1521, 1, 0, 0, 0, 1521, 1522, 1, 0, 0, 0, 1522, 1524, 3, 210, 105, 0, 1523, 1520, 1, 0, 0, 0, 1523, 1524, 1, 0, 0, 0, 1524, 1530, 1, 0, 0, 0, 1525, 1526, 5, 87, 0, 0, 1526, 1527, 5, 42, 0, 0, 1527, 1531, 3, 196, 98, 0, 1528, 1529, 5, 104, 0, 0, 1529, 1531, 5, 87, 0, 0, 1530, 1525, 1, 0, 0, 0, 1530, 1528, 1, 0, 0, 0, 1530, 1531, 1, 0, 0, 0, 1531, 1578, 1, 0, 0, 0, 1532, 1533, 3, 182, 91, 0, 1533, 1534, 5, 2, 0, 0, 1534, 1536, 1, 0, 0, 0, 1535, 1532, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, 1537, 1, 0, 0, 0, 1537, 1538, 3, 226, 113, 0, 1538, 1539, 5, 3, 0, 0, 1539, 1544, 3, 68, 34, 0, 1540, 1541, 5, 5, 0, 0, 1541, 1543, 3, 68, 34, 0, 1542, 1540, 1, 0, 0, 0, 1543, 1546, 1, 0, 0, 0, 1544, 1542, 1, 0, 0, 0, 1544, 1545, 1, 0, 0, 0, 1545, 1547, 1, 0, 0, 0, 1546, 1544, 1, 0, 0, 0, 1547, 1552, 5, 4, 0, 0, 1548, 1550, 5, 35, 0, 0, 1549, 1548, 1, 0, 0, 0, 1549, 1550, 1, 0, 0, 0, 1550, 1551, 1, 0, 0, 0, 1551, 1553, 3, 210, 105, 0, 1552, 1549, 1, 0, 0, 0, 1552, 1553, 1, 0, 0, 0, 1553, 1578, 1, 0, 0, 0, 1554, 1564, 5, 3, 0, 0, 1555, 1560, 3, 96, 48, 0, 1556, 1557, 5, 5, 0, 0, 1557, 1559, 3, 96, 48, 0, 1558, 1556, 1, 0, 0, 0, 1559, 1562, 1, 0, 0, 0, 1560, 1558, 1, 0, 0, 0, 1560, 1561, 1, 0, 0, 0, 1561, 1565, 1, 0, 0, 0, 1562, 1560, 1, 0, 0, 0, 1563, 1565, 3, 86, 43, 0, 1564, 1555, 1, 0, 0, 0, 1564, 1563, 1, 0, 0, 0, 1565, 1566, 1, 0, 0, 0, 1566, 1567, 5, 4, 0, 0, 1567, 1578, 1, 0, 0, 0, 1568, 1569, 5, 3, 0, 0, 1569, 1570, 3, 84, 42, 0, 1570, 1575, 5, 4, 0, 0, 1571, 1573, 5, 35, 0, 0, 1572, 1571, 1, 0, 0, 0, 1572, 1573, 1, 0, 0, 0, 1573, 1574, 1, 0, 0, 0, 1574, 1576, 3, 210, 105, 0, 1575, 1572, 1, 0, 0, 0, 1575, 1576, 1, 0, 0, 0, 1576, 1578, 1, 0, 0, 0, 1577, 1452, 1, 0, 0, 0, 1577, 1471, 1, 0, 0, 0, 1577, 1490, 1, 0, 0, 0, 1577, 1504, 1, 0, 0, 0, 1577, 1516, 1, 0, 0, 0, 1577, 1535, 1, 0, 0, 0, 1577, 1554, 1, 0, 0, 0, 1577, 1568, 1, 0, 0, 0, 1578, 97, 1, 0, 0, 0, 1579, 1592, 5, 7, 0, 0, 1580, 1581, 3, 184, 92, 0, 1581, 1582, 5, 2, 0, 0, 1582, 1583, 5, 7, 0, 0, 1583, 1592, 1, 0, 0, 0, 1584, 1589, 3, 68, 34, 0, 1585, 1587, 5, 35, 0, 0, 1586, 1585, 1, 0, 0, 0, 1586, 1587, 1, 0, 0, 0, 1587, 1588, 1, 0, 0, 0, 1588, 1590, 3, 172, 86, 0, 1589, 1586, 1, 0, 0, 0, 1589, 1590, 1, 0, 0, 0, 1590, 1592, 1, 0, 0, 0, 1591, 1579, 1, 0, 0, 0, 1591, 1580, 1, 0, 0, 0, 1591, 1584, 1, 0, 0, 0, 1592, 99, 1, 0, 0, 0, 1593, 1608, 5, 5, 0, 0, 1594, 1596, 5, 102, 0, 0, 1595, 1594, 1, 0, 0, 0, 1595, 1596, 1, 0, 0, 0, 1596, 1602, 1, 0, 0, 0, 1597, 1599, 7, 18, 0, 0, 1598, 1600, 5, 112, 0, 0, 1599, 1598, 1, 0, 0, 0, 1599, 1600, 1, 0, 0, 0, 1600, 1603, 1, 0, 0, 0, 1601, 1603, 5, 89, 0, 0, 1602, 1597, 1, 0, 0, 0, 1602, 1601, 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1604, 1, 0, 0, 0, 1604, 1608, 5, 96, 0, 0, 1605, 1606, 5, 53, 0, 0, 1606, 1608, 5, 96, 0, 0, 1607, 1593, 1, 0, 0, 0, 1607, 1595, 1, 0, 0, 0, 1607, 1605, 1, 0, 0, 0, 1608, 101, 1, 0, 0, 0, 1609, 1610, 5, 109, 0, 0, 1610, 1624, 3, 68, 34, 0, 1611, 1612, 5, 145, 0, 0, 1612, 1613, 5, 3, 0, 0, 1613, 1618, 3, 190, 95, 0, 1614, 1615, 5, 5, 0, 0, 1615, 1617, 3, 190, 95, 0, 1616, 1614, 1, 0, 0, 0, 1617, 1620, 1, 0, 0, 0, 1618, 1616, 1, 0, 0, 0, 1618, 1619, 1, 0, 0, 0, 1619, 1621, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1621, 1622, 5, 4, 0, 0, 1622, 1624, 1, 0, 0, 0, 1623, 1609, 1, 0, 0, 0, 1623, 1611, 1, 0, 0, 0, 1623, 1624, 1, 0, 0, 0, 1624, 103, 1, 0, 0, 0, 1625, 1627, 5, 142, 0, 0, 1626, 1628, 5, 31, 0, 0, 1627, 1626, 1, 0, 0, 0, 1627, 1628, 1, 0, 0, 0, 1628, 1632, 1, 0, 0, 0, 1629, 1632, 5, 92, 0, 0, 1630, 1632, 5, 70, 0, 0, 1631, 1625, 1, 0, 0, 0, 1631, 1629, 1, 0, 0, 0, 1631, 1630, 1, 0, 0, 0, 1632, 105, 1, 0, 0, 0, 1633, 1635, 3, 50, 25, 0, 1634, 1633, 1, 0, 0, 0, 1634, 1635, 1, 0, 0, 0, 1635, 1636, 1, 0, 0, 0, 1636, 1639, 5, 144, 0, 0, 1637, 1638, 5, 110, 0, 0, 1638, 1640, 7, 8, 0, 0, 1639, 1637, 1, 0, 0, 0, 1639, 1640, 1, 0, 0, 0, 1640, 1641, 1, 0, 0, 0, 1641, 1642, 3, 112, 56, 0, 1642, 1645, 5, 133, 0, 0, 1643, 1646, 3, 190, 95, 0, 1644, 1646, 3, 108, 54, 0, 1645, 1643, 1, 0, 0, 0, 1645, 1644, 1, 0, 0, 0, 1646, 1647, 1, 0, 0, 0, 1647, 1648, 5, 6, 0, 0, 1648, 1659, 3, 68, 34, 0, 1649, 1652, 5, 5, 0, 0, 1650, 1653, 3, 190, 95, 0, 1651, 1653, 3, 108, 54, 0, 1652, 1650, 1, 0, 0, 0, 1652, 1651, 1, 0, 0, 0, 1653, 1654, 1, 0, 0, 0, 1654, 1655, 5, 6, 0, 0, 1655, 1656, 3, 68, 34, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1649, 1, 0, 0, 0, 1658, 1661, 1, 0, 0, 0, 1659, 1657, 1, 0, 0, 0, 1659, 1660, 1, 0, 0, 0, 1660, 1664, 1, 0, 0, 0, 1661, 1659, 1, 0, 0, 0, 1662, 1663, 5, 151, 0, 0, 1663, 1665, 3, 68, 34, 0, 1664, 1662, 1, 0, 0, 0, 1664, 1665, 1, 0, 0, 0, 1665, 1667, 1, 0, 0, 0, 1666, 1668, 3, 58, 29, 0, 1667, 1666, 1, 0, 0, 0, 1667, 1668, 1, 0, 0, 0, 1668, 107, 1, 0, 0, 0, 1669, 1670, 5, 3, 0, 0, 1670, 1675, 3, 190, 95, 0, 1671, 1672, 5, 5, 0, 0, 1672, 1674, 3, 190, 95, 0, 1673, 1671, 1, 0, 0, 0, 1674, 1677, 1, 0, 0, 0, 1675, 1673, 1, 0, 0, 0, 1675, 1676, 1, 0, 0, 0, 1676, 1678, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1678, 1679, 5, 4, 0, 0, 1679, 109, 1, 0, 0, 0, 1680, 1682, 3, 50, 25, 0, 1681, 1680, 1, 0, 0, 0, 1681, 1682, 1, 0, 0, 0, 1682, 1683, 1, 0, 0, 0, 1683, 1686, 5, 144, 0, 0, 1684, 1685, 5, 110, 0, 0, 1685, 1687, 7, 8, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1688, 1, 0, 0, 0, 1688, 1689, 3, 112, 56, 0, 1689, 1692, 5, 133, 0, 0, 1690, 1693, 3, 190, 95, 0, 1691, 1693, 3, 108, 54, 0, 1692, 1690, 1, 0, 0, 0, 1692, 1691, 1, 0, 0, 0, 1693, 1694, 1, 0, 0, 0, 1694, 1695, 5, 6, 0, 0, 1695, 1706, 3, 68, 34, 0, 1696, 1699, 5, 5, 0, 0, 1697, 1700, 3, 190, 95, 0, 1698, 1700, 3, 108, 54, 0, 1699, 1697, 1, 0, 0, 0, 1699, 1698, 1, 0, 0, 0, 1700, 1701, 1, 0, 0, 0, 1701, 1702, 5, 6, 0, 0, 1702, 1703, 3, 68, 34, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1696, 1, 0, 0, 0, 1705, 1708, 1, 0, 0, 0, 1706, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1711, 1, 0, 0, 0, 1708, 1706, 1, 0, 0, 0, 1709, 1710, 5, 151, 0, 0, 1710, 1712, 3, 68, 34, 0, 1711, 1709, 1, 0, 0, 0, 1711, 1712, 1, 0, 0, 0, 1712, 1717, 1, 0, 0, 0, 1713, 1715, 3, 134, 67, 0, 1714, 1713, 1, 0, 0, 0, 1714, 1715, 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 1718, 3, 136, 68, 0, 1717, 1714, 1, 0, 0, 0, 1717, 1718, 1, 0, 0, 0, 1718, 111, 1, 0, 0, 0, 1719, 1720, 3, 182, 91, 0, 1720, 1721, 5, 2, 0, 0, 1721, 1723, 1, 0, 0, 0, 1722, 1719, 1, 0, 0, 0, 1722, 1723, 1, 0, 0, 0, 1723, 1724, 1, 0, 0, 0, 1724, 1727, 3, 184, 92, 0, 1725, 1726, 5, 35, 0, 0, 1726, 1728, 3, 216, 108, 0, 1727, 1725, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1734, 1, 0, 0, 0, 1729, 1730, 5, 87, 0, 0, 1730, 1731, 5, 42, 0, 0, 1731, 1735, 3, 196, 98, 0, 1732, 1733, 5, 104, 0, 0, 1733, 1735, 5, 87, 0, 0, 1734, 1729, 1, 0, 0, 0, 1734, 1732, 1, 0, 0, 0, 1734, 1735, 1, 0, 0, 0, 1735, 113, 1, 0, 0, 0, 1736, 1738, 5, 146, 0, 0, 1737, 1739, 3, 182, 91, 0, 1738, 1737, 1, 0, 0, 0, 1738, 1739, 1, 0, 0, 0, 1739, 1742, 1, 0, 0, 0, 1740, 1741, 5, 93, 0, 0, 1741, 1743, 3, 218, 109, 0, 1742, 1740, 1, 0, 0, 0, 1742, 1743, 1, 0, 0, 0, 1743, 115, 1, 0, 0, 0, 1744, 1745, 5, 181, 0, 0, 1745, 1746, 5, 3, 0, 0, 1746, 1747, 5, 151, 0, 0, 1747, 1748, 3, 68, 34, 0, 1748, 1749, 5, 4, 0, 0, 1749, 117, 1, 0, 0, 0, 1750, 1752, 5, 3, 0, 0, 1751, 1753, 3, 220, 110, 0, 1752, 1751, 1, 0, 0, 0, 1752, 1753, 1, 0, 0, 0, 1753, 1764, 1, 0, 0, 0, 1754, 1755, 5, 156, 0, 0, 1755, 1756, 5, 42, 0, 0, 1756, 1761, 3, 68, 34, 0, 1757, 1758, 5, 5, 0, 0, 1758, 1760, 3, 68, 34, 0, 1759, 1757, 1, 0, 0, 0, 1760, 1763, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1761, 1762, 1, 0, 0, 0, 1762, 1765, 1, 0, 0, 0, 1763, 1761, 1, 0, 0, 0, 1764, 1754, 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 1, 0, 0, 0, 1766, 1767, 5, 111, 0, 0, 1767, 1768, 5, 42, 0, 0, 1768, 1773, 3, 138, 69, 0, 1769, 1770, 5, 5, 0, 0, 1770, 1772, 3, 138, 69, 0, 1771, 1769, 1, 0, 0, 0, 1772, 1775, 1, 0, 0, 0, 1773, 1771, 1, 0, 0, 0, 1773, 1774, 1, 0, 0, 0, 1774, 1777, 1, 0, 0, 0, 1775, 1773, 1, 0, 0, 0, 1776, 1778, 3, 122, 61, 0, 1777, 1776, 1, 0, 0, 0, 1777, 1778, 1, 0, 0, 0, 1778, 1779, 1, 0, 0, 0, 1779, 1780, 5, 4, 0, 0, 1780, 119, 1, 0, 0, 0, 1781, 1815, 5, 155, 0, 0, 1782, 1816, 3, 214, 107, 0, 1783, 1785, 5, 3, 0, 0, 1784, 1786, 3, 220, 110, 0, 1785, 1784, 1, 0, 0, 0, 1785, 1786, 1, 0, 0, 0, 1786, 1797, 1, 0, 0, 0, 1787, 1788, 5, 156, 0, 0, 1788, 1789, 5, 42, 0, 0, 1789, 1794, 3, 68, 34, 0, 1790, 1791, 5, 5, 0, 0, 1791, 1793, 3, 68, 34, 0, 1792, 1790, 1, 0, 0, 0, 1793, 1796, 1, 0, 0, 0, 1794, 1792, 1, 0, 0, 0, 1794, 1795, 1, 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, 1, 0, 0, 0, 1797, 1787, 1, 0, 0, 0, 1797, 1798, 1, 0, 0, 0, 1798, 1809, 1, 0, 0, 0, 1799, 1800, 5, 111, 0, 0, 1800, 1801, 5, 42, 0, 0, 1801, 1806, 3, 138, 69, 0, 1802, 1803, 5, 5, 0, 0, 1803, 1805, 3, 138, 69, 0, 1804, 1802, 1, 0, 0, 0, 1805, 1808, 1, 0, 0, 0, 1806, 1804, 1, 0, 0, 0, 1806, 1807, 1, 0, 0, 0, 1807, 1810, 1, 0, 0, 0, 1808, 1806, 1, 0, 0, 0, 1809, 1799, 1, 0, 0, 0, 1809, 1810, 1, 0, 0, 0, 1810, 1812, 1, 0, 0, 0, 1811, 1813, 3, 122, 61, 0, 1812, 1811, 1, 0, 0, 0, 1812, 1813, 1, 0, 0, 0, 1813, 1814, 1, 0, 0, 0, 1814, 1816, 5, 4, 0, 0, 1815, 1782, 1, 0, 0, 0, 1815, 1783, 1, 0, 0, 0, 1816, 121, 1, 0, 0, 0, 1817, 1825, 3, 124, 62, 0, 1818, 1819, 5, 183, 0, 0, 1819, 1820, 5, 103, 0, 0, 1820, 1826, 5, 185, 0, 0, 1821, 1822, 5, 160, 0, 0, 1822, 1826, 5, 129, 0, 0, 1823, 1826, 5, 80, 0, 0, 1824, 1826, 5, 184, 0, 0, 1825, 1818, 1, 0, 0, 0, 1825, 1821, 1, 0, 0, 0, 1825, 1823, 1, 0, 0, 0, 1825, 1824, 1, 0, 0, 0, 1825, 1826, 1, 0, 0, 0, 1826, 123, 1, 0, 0, 0, 1827, 1834, 7, 19, 0, 0, 1828, 1835, 3, 146, 73, 0, 1829, 1830, 5, 41, 0, 0, 1830, 1831, 3, 142, 71, 0, 1831, 1832, 5, 34, 0, 0, 1832, 1833, 3, 144, 72, 0, 1833, 1835, 1, 0, 0, 0, 1834, 1828, 1, 0, 0, 0, 1834, 1829, 1, 0, 0, 0, 1835, 125, 1, 0, 0, 0, 1836, 1837, 3, 222, 111, 0, 1837, 1847, 5, 3, 0, 0, 1838, 1843, 3, 68, 34, 0, 1839, 1840, 5, 5, 0, 0, 1840, 1842, 3, 68, 34, 0, 1841, 1839, 1, 0, 0, 0, 1842, 1845, 1, 0, 0, 0, 1843, 1841, 1, 0, 0, 0, 1843, 1844, 1, 0, 0, 0, 1844, 1848, 1, 0, 0, 0, 1845, 1843, 1, 0, 0, 0, 1846, 1848, 5, 7, 0, 0, 1847, 1838, 1, 0, 0, 0, 1847, 1846, 1, 0, 0, 0, 1848, 1849, 1, 0, 0, 0, 1849, 1850, 5, 4, 0, 0, 1850, 127, 1, 0, 0, 0, 1851, 1852, 3, 224, 112, 0, 1852, 1865, 5, 3, 0, 0, 1853, 1855, 5, 64, 0, 0, 1854, 1853, 1, 0, 0, 0, 1854, 1855, 1, 0, 0, 0, 1855, 1856, 1, 0, 0, 0, 1856, 1861, 3, 68, 34, 0, 1857, 1858, 5, 5, 0, 0, 1858, 1860, 3, 68, 34, 0, 1859, 1857, 1, 0, 0, 0, 1860, 1863, 1, 0, 0, 0, 1861, 1859, 1, 0, 0, 0, 1861, 1862, 1, 0, 0, 0, 1862, 1866, 1, 0, 0, 0, 1863, 1861, 1, 0, 0, 0, 1864, 1866, 5, 7, 0, 0, 1865, 1854, 1, 0, 0, 0, 1865, 1864, 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1867, 1, 0, 0, 0, 1867, 1869, 5, 4, 0, 0, 1868, 1870, 3, 116, 58, 0, 1869, 1868, 1, 0, 0, 0, 1869, 1870, 1, 0, 0, 0, 1870, 129, 1, 0, 0, 0, 1871, 1872, 3, 148, 74, 0, 1872, 1882, 5, 3, 0, 0, 1873, 1878, 3, 68, 34, 0, 1874, 1875, 5, 5, 0, 0, 1875, 1877, 3, 68, 34, 0, 1876, 1874, 1, 0, 0, 0, 1877, 1880, 1, 0, 0, 0, 1878, 1876, 1, 0, 0, 0, 1878, 1879, 1, 0, 0, 0, 1879, 1883, 1, 0, 0, 0, 1880, 1878, 1, 0, 0, 0, 1881, 1883, 5, 7, 0, 0, 1882, 1873, 1, 0, 0, 0, 1882, 1881, 1, 0, 0, 0, 1882, 1883, 1, 0, 0, 0, 1883, 1884, 1, 0, 0, 0, 1884, 1886, 5, 4, 0, 0, 1885, 1887, 3, 116, 58, 0, 1886, 1885, 1, 0, 0, 0, 1886, 1887, 1, 0, 0, 0, 1887, 1888, 1, 0, 0, 0, 1888, 1891, 5, 155, 0, 0, 1889, 1892, 3, 118, 59, 0, 1890, 1892, 3, 214, 107, 0, 1891, 1889, 1, 0, 0, 0, 1891, 1890, 1, 0, 0, 0, 1892, 131, 1, 0, 0, 0, 1893, 1895, 5, 152, 0, 0, 1894, 1896, 5, 118, 0, 0, 1895, 1894, 1, 0, 0, 0, 1895, 1896, 1, 0, 0, 0, 1896, 1897, 1, 0, 0, 0, 1897, 1902, 3, 56, 28, 0, 1898, 1899, 5, 5, 0, 0, 1899, 1901, 3, 56, 28, 0, 1900, 1898, 1, 0, 0, 0, 1901, 1904, 1, 0, 0, 0, 1902, 1900, 1, 0, 0, 0, 1902, 1903, 1, 0, 0, 0, 1903, 133, 1, 0, 0, 0, 1904, 1902, 1, 0, 0, 0, 1905, 1906, 5, 111, 0, 0, 1906, 1907, 5, 42, 0, 0, 1907, 1912, 3, 138, 69, 0, 1908, 1909, 5, 5, 0, 0, 1909, 1911, 3, 138, 69, 0, 1910, 1908, 1, 0, 0, 0, 1911, 1914, 1, 0, 0, 0, 1912, 1910, 1, 0, 0, 0, 1912, 1913, 1, 0, 0, 0, 1913, 135, 1, 0, 0, 0, 1914, 1912, 1, 0, 0, 0, 1915, 1916, 5, 100, 0, 0, 1916, 1919, 3, 68, 34, 0, 1917, 1918, 7, 20, 0, 0, 1918, 1920, 3, 68, 34, 0, 1919, 1917, 1, 0, 0, 0, 1919, 1920, 1, 0, 0, 0, 1920, 137, 1, 0, 0, 0, 1921, 1924, 3, 68, 34, 0, 1922, 1923, 5, 47, 0, 0, 1923, 1925, 3, 192, 96, 0, 1924, 1922, 1, 0, 0, 0, 1924, 1925, 1, 0, 0, 0, 1925, 1927, 1, 0, 0, 0, 1926, 1928, 3, 140, 70, 0, 1927, 1926, 1, 0, 0, 0, 1927, 1928, 1, 0, 0, 0, 1928, 1931, 1, 0, 0, 0, 1929, 1930, 5, 178, 0, 0, 1930, 1932, 7, 21, 0, 0, 1931, 1929, 1, 0, 0, 0, 1931, 1932, 1, 0, 0, 0, 1932, 139, 1, 0, 0, 0, 1933, 1934, 7, 22, 0, 0, 1934, 141, 1, 0, 0, 0, 1935, 1936, 3, 68, 34, 0, 1936, 1937, 5, 158, 0, 0, 1937, 1946, 1, 0, 0, 0, 1938, 1939, 3, 68, 34, 0, 1939, 1940, 5, 161, 0, 0, 1940, 1946, 1, 0, 0, 0, 1941, 1942, 5, 160, 0, 0, 1942, 1946, 5, 129, 0, 0, 1943, 1944, 5, 159, 0, 0, 1944, 1946, 5, 158, 0, 0, 1945, 1935, 1, 0, 0, 0, 1945, 1938, 1, 0, 0, 0, 1945, 1941, 1, 0, 0, 0, 1945, 1943, 1, 0, 0, 0, 1946, 143, 1, 0, 0, 0, 1947, 1948, 3, 68, 34, 0, 1948, 1949, 5, 158, 0, 0, 1949, 1958, 1, 0, 0, 0, 1950, 1951, 3, 68, 34, 0, 1951, 1952, 5, 161, 0, 0, 1952, 1958, 1, 0, 0, 0, 1953, 1954, 5, 160, 0, 0, 1954, 1958, 5, 129, 0, 0, 1955, 1956, 5, 159, 0, 0, 1956, 1958, 5, 161, 0, 0, 1957, 1947, 1, 0, 0, 0, 1957, 1950, 1, 0, 0, 0, 1957, 1953, 1, 0, 0, 0, 1957, 1955, 1, 0, 0, 0, 1958, 145, 1, 0, 0, 0, 1959, 1960, 3, 68, 34, 0, 1960, 1961, 5, 158, 0, 0, 1961, 1967, 1, 0, 0, 0, 1962, 1963, 5, 159, 0, 0, 1963, 1967, 5, 158, 0, 0, 1964, 1965, 5, 160, 0, 0, 1965, 1967, 5, 129, 0, 0, 1966, 1959, 1, 0, 0, 0, 1966, 1962, 1, 0, 0, 0, 1966, 1964, 1, 0, 0, 0, 1967, 147, 1, 0, 0, 0, 1968, 1969, 7, 23, 0, 0, 1969, 1970, 5, 3, 0, 0, 1970, 1971, 3, 68, 34, 0, 1971, 1972, 5, 4, 0, 0, 1972, 1973, 5, 155, 0, 0, 1973, 1975, 5, 3, 0, 0, 1974, 1976, 3, 154, 77, 0, 1975, 1974, 1, 0, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1977, 1, 0, 0, 0, 1977, 1979, 3, 158, 79, 0, 1978, 1980, 3, 124, 62, 0, 1979, 1978, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, 1981, 1, 0, 0, 0, 1981, 1982, 5, 4, 0, 0, 1982, 2054, 1, 0, 0, 0, 1983, 1984, 7, 24, 0, 0, 1984, 1985, 5, 3, 0, 0, 1985, 1986, 5, 4, 0, 0, 1986, 1987, 5, 155, 0, 0, 1987, 1989, 5, 3, 0, 0, 1988, 1990, 3, 154, 77, 0, 1989, 1988, 1, 0, 0, 0, 1989, 1990, 1, 0, 0, 0, 1990, 1992, 1, 0, 0, 0, 1991, 1993, 3, 156, 78, 0, 1992, 1991, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, 1994, 1, 0, 0, 0, 1994, 2054, 5, 4, 0, 0, 1995, 1996, 7, 25, 0, 0, 1996, 1997, 5, 3, 0, 0, 1997, 1998, 5, 4, 0, 0, 1998, 1999, 5, 155, 0, 0, 1999, 2001, 5, 3, 0, 0, 2000, 2002, 3, 154, 77, 0, 2001, 2000, 1, 0, 0, 0, 2001, 2002, 1, 0, 0, 0, 2002, 2003, 1, 0, 0, 0, 2003, 2004, 3, 158, 79, 0, 2004, 2005, 5, 4, 0, 0, 2005, 2054, 1, 0, 0, 0, 2006, 2007, 7, 26, 0, 0, 2007, 2008, 5, 3, 0, 0, 2008, 2010, 3, 68, 34, 0, 2009, 2011, 3, 150, 75, 0, 2010, 2009, 1, 0, 0, 0, 2010, 2011, 1, 0, 0, 0, 2011, 2013, 1, 0, 0, 0, 2012, 2014, 3, 152, 76, 0, 2013, 2012, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, 0, 2014, 2015, 1, 0, 0, 0, 2015, 2016, 5, 4, 0, 0, 2016, 2017, 5, 155, 0, 0, 2017, 2019, 5, 3, 0, 0, 2018, 2020, 3, 154, 77, 0, 2019, 2018, 1, 0, 0, 0, 2019, 2020, 1, 0, 0, 0, 2020, 2021, 1, 0, 0, 0, 2021, 2022, 3, 158, 79, 0, 2022, 2023, 5, 4, 0, 0, 2023, 2054, 1, 0, 0, 0, 2024, 2025, 5, 167, 0, 0, 2025, 2026, 5, 3, 0, 0, 2026, 2027, 3, 68, 34, 0, 2027, 2028, 5, 5, 0, 0, 2028, 2029, 3, 36, 18, 0, 2029, 2030, 5, 4, 0, 0, 2030, 2031, 5, 155, 0, 0, 2031, 2033, 5, 3, 0, 0, 2032, 2034, 3, 154, 77, 0, 2033, 2032, 1, 0, 0, 0, 2033, 2034, 1, 0, 0, 0, 2034, 2035, 1, 0, 0, 0, 2035, 2037, 3, 158, 79, 0, 2036, 2038, 3, 124, 62, 0, 2037, 2036, 1, 0, 0, 0, 2037, 2038, 1, 0, 0, 0, 2038, 2039, 1, 0, 0, 0, 2039, 2040, 5, 4, 0, 0, 2040, 2054, 1, 0, 0, 0, 2041, 2042, 5, 168, 0, 0, 2042, 2043, 5, 3, 0, 0, 2043, 2044, 3, 68, 34, 0, 2044, 2045, 5, 4, 0, 0, 2045, 2046, 5, 155, 0, 0, 2046, 2048, 5, 3, 0, 0, 2047, 2049, 3, 154, 77, 0, 2048, 2047, 1, 0, 0, 0, 2048, 2049, 1, 0, 0, 0, 2049, 2050, 1, 0, 0, 0, 2050, 2051, 3, 158, 79, 0, 2051, 2052, 5, 4, 0, 0, 2052, 2054, 1, 0, 0, 0, 2053, 1968, 1, 0, 0, 0, 2053, 1983, 1, 0, 0, 0, 2053, 1995, 1, 0, 0, 0, 2053, 2006, 1, 0, 0, 0, 2053, 2024, 1, 0, 0, 0, 2053, 2041, 1, 0, 0, 0, 2054, 149, 1, 0, 0, 0, 2055, 2056, 5, 5, 0, 0, 2056, 2057, 3, 36, 18, 0, 2057, 151, 1, 0, 0, 0, 2058, 2059, 5, 5, 0, 0, 2059, 2060, 3, 36, 18, 0, 2060, 153, 1, 0, 0, 0, 2061, 2062, 5, 156, 0, 0, 2062, 2064, 5, 42, 0, 0, 2063, 2065, 3, 68, 34, 0, 2064, 2063, 1, 0, 0, 0, 2065, 2066, 1, 0, 0, 0, 2066, 2064, 1, 0, 0, 0, 2066, 2067, 1, 0, 0, 0, 2067, 155, 1, 0, 0, 0, 2068, 2069, 5, 111, 0, 0, 2069, 2071, 5, 42, 0, 0, 2070, 2072, 3, 68, 34, 0, 2071, 2070, 1, 0, 0, 0, 2072, 2073, 1, 0, 0, 0, 2073, 2071, 1, 0, 0, 0, 2073, 2074, 1, 0, 0, 0, 2074, 157, 1, 0, 0, 0, 2075, 2076, 5, 111, 0, 0, 2076, 2077, 5, 42, 0, 0, 2077, 2078, 3, 158, 79, 0, 2078, 159, 1, 0, 0, 0, 2079, 2081, 3, 68, 34, 0, 2080, 2082, 3, 140, 70, 0, 2081, 2080, 1, 0, 0, 0, 2081, 2082, 1, 0, 0, 0, 2082, 2090, 1, 0, 0, 0, 2083, 2084, 5, 5, 0, 0, 2084, 2086, 3, 68, 34, 0, 2085, 2087, 3, 140, 70, 0, 2086, 2085, 1, 0, 0, 0, 2086, 2087, 1, 0, 0, 0, 2087, 2089, 1, 0, 0, 0, 2088, 2083, 1, 0, 0, 0, 2089, 2092, 1, 0, 0, 0, 2090, 2088, 1, 0, 0, 0, 2090, 2091, 1, 0, 0, 0, 2091, 161, 1, 0, 0, 0, 2092, 2090, 1, 0, 0, 0, 2093, 2094, 3, 84, 42, 0, 2094, 163, 1, 0, 0, 0, 2095, 2096, 3, 84, 42, 0, 2096, 165, 1, 0, 0, 0, 2097, 2098, 7, 27, 0, 0, 2098, 167, 1, 0, 0, 0, 2099, 2100, 5, 192, 0, 0, 2100, 169, 1, 0, 0, 0, 2101, 2104, 3, 68, 34, 0, 2102, 2104, 3, 30, 15, 0, 2103, 2101, 1, 0, 0, 0, 2103, 2102, 1, 0, 0, 0, 2104, 171, 1, 0, 0, 0, 2105, 2106, 7, 28, 0, 0, 2106, 173, 1, 0, 0, 0, 2107, 2108, 7, 29, 0, 0, 2108, 175, 1, 0, 0, 0, 2109, 2110, 3, 228, 114, 0, 2110, 177, 1, 0, 0, 0, 2111, 2112, 3, 228, 114, 0, 2112, 179, 1, 0, 0, 0, 2113, 2114, 3, 182, 91, 0, 2114, 2115, 5, 2, 0, 0, 2115, 2117, 1, 0, 0, 0, 2116, 2113, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2118, 1, 0, 0, 0, 2118, 2119, 3, 178, 89, 0, 2119, 181, 1, 0, 0, 0, 2120, 2121, 3, 228, 114, 0, 2121, 183, 1, 0, 0, 0, 2122, 2123, 3, 228, 114, 0, 2123, 185, 1, 0, 0, 0, 2124, 2125, 3, 228, 114, 0, 2125, 187, 1, 0, 0, 0, 2126, 2127, 3, 228, 114, 0, 2127, 189, 1, 0, 0, 0, 2128, 2129, 3, 228, 114, 0, 2129, 191, 1, 0, 0, 0, 2130, 2131, 3, 228, 114, 0, 2131, 193, 1, 0, 0, 0, 2132, 2133, 3, 228, 114, 0, 2133, 195, 1, 0, 0, 0, 2134, 2135, 3, 228, 114, 0, 2135, 197, 1, 0, 0, 0, 2136, 2137, 3, 228, 114, 0, 2137, 199, 1, 0, 0, 0, 2138, 2139, 3, 228, 114, 0, 2139, 201, 1, 0, 0, 0, 2140, 2141, 3, 228, 114, 0, 2141, 203, 1, 0, 0, 0, 2142, 2143, 3, 228, 114, 0, 2143, 205, 1, 0, 0, 0, 2144, 2145, 3, 228, 114, 0, 2145, 207, 1, 0, 0, 0, 2146, 2147, 7, 28, 0, 0, 2147, 209, 1, 0, 0, 0, 2148, 2149, 3, 228, 114, 0, 2149, 211, 1, 0, 0, 0, 2150, 2151, 3, 228, 114, 0, 2151, 213, 1, 0, 0, 0, 2152, 2153, 3, 228, 114, 0, 2153, 215, 1, 0, 0, 0, 2154, 2155, 3, 228, 114, 0, 2155, 217, 1, 0, 0, 0, 2156, 2157, 3, 228, 114, 0, 2157, 219, 1, 0, 0, 0, 2158, 2159, 3, 228, 114, 0, 2159, 221, 1, 0, 0, 0, 2160, 2161, 3, 228, 114, 0, 2161, 223, 1, 0, 0, 0, 2162, 2163, 3, 228, 114, 0, 2163, 225, 1, 0, 0, 0, 2164, 2165, 3, 228, 114, 0, 2165, 227, 1, 0, 0, 0, 2166, 2174, 5, 188, 0, 0, 2167, 2174, 3, 174, 87, 0, 2168, 2174, 5, 192, 0, 0, 2169, 2170, 5, 3, 0, 0, 2170, 2171, 3, 228, 114, 0, 2171, 2172, 5, 4, 0, 0, 2172, 2174, 1, 0, 0, 0, 2173, 2166, 1, 0, 0, 0, 2173, 2167, 1, 0, 0, 0, 2173, 2168, 1, 0, 0, 0, 2173, 2169, 1, 0, 0, 0, 2174, 229, 1, 0, 0, 0, 313, 233, 241, 248, 253, 259, 265, 267, 293, 300, 307, 313, 317, 322, 325, 332, 335, 339, 347, 351, 353, 357, 361, 365, 368, 375, 381, 387, 392, 403, 409, 413, 417, 420, 425, 429, 435, 440, 449, 456, 465, 468, 472, 476, 481, 487, 499, 503, 508, 511, 514, 519, 522, 536, 543, 550, 552, 555, 561, 566, 574, 579, 594, 600, 610, 615, 625, 629, 631, 635, 640, 642, 650, 656, 661, 668, 679, 682, 684, 691, 695, 702, 708, 714, 720, 725, 734, 739, 750, 755, 766, 771, 775, 791, 801, 806, 814, 826, 831, 842, 845, 847, 853, 856, 858, 862, 866, 873, 876, 879, 886, 889, 892, 895, 899, 907, 912, 923, 928, 937, 944, 948, 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1034, 1041, 1052, 1061, 1071, 1074, 1080, 1086, 1095, 1098, 1102, 1109, 1115, 1122, 1124, 1126, 1135, 1142, 1149, 1155, 1160, 1168, 1173, 1182, 1193, 1200, 1206, 1209, 1212, 1222, 1228, 1230, 1238, 1245, 1252, 1257, 1259, 1265, 1274, 1279, 1286, 1290, 1292, 1295, 1303, 1307, 1310, 1319, 1324, 1331, 1340, 1344, 1346, 1350, 1359, 1364, 1366, 1379, 1382, 1391, 1402, 1409, 1412, 1417, 1421, 1424, 1427, 1432, 1436, 1441, 1444, 1447, 1452, 1456, 1459, 1466, 1471, 1480, 1485, 1488, 1496, 1500, 1508, 1511, 1516, 1520, 1523, 1530, 1535, 1544, 1549, 1552, 1560, 1564, 1572, 1575, 1577, 1586, 1589, 1591, 1595, 1599, 1602, 1607, 1618, 1623, 1627, 1631, 1634, 1639, 1645, 1652, 1659, 1664, 1667, 1675, 1681, 1686, 1692, 1699, 1706, 1711, 1714, 1717, 1722, 1727, 1734, 1738, 1742, 1752, 1761, 1764, 1773, 1777, 1785, 1794, 1797, 1806, 1809, 1812, 1815, 1825, 1834, 1843, 1847, 1854, 1861, 1865, 1869, 1878, 1882, 1886, 1891, 1895, 1902, 1912, 1919, 1924, 1927, 1931, 1945, 1957, 1966, 1975, 1979, 1989, 1992, 2001, 2010, 2013, 2019, 2033, 2037, 2048, 2053, 2066, 2073, 2081, 2086, 2090, 2103, 2116, 2173] \ No newline at end of file diff --git a/internal/engine/sqlite/parser/SQLiteParser.tokens b/internal/engine/sqlite/parser/SQLiteParser.tokens index 928604c851..6777c57bdc 100644 --- a/internal/engine/sqlite/parser/SQLiteParser.tokens +++ b/internal/engine/sqlite/parser/SQLiteParser.tokens @@ -6,193 +6,195 @@ COMMA=5 ASSIGN=6 STAR=7 PLUS=8 -MINUS=9 -TILDE=10 -PIPE2=11 -DIV=12 -MOD=13 -LT2=14 -GT2=15 -AMP=16 -PIPE=17 -LT=18 -LT_EQ=19 -GT=20 -GT_EQ=21 -EQ=22 -NOT_EQ1=23 -NOT_EQ2=24 -ABORT_=25 -ACTION_=26 -ADD_=27 -AFTER_=28 -ALL_=29 -ALTER_=30 -ANALYZE_=31 -AND_=32 -AS_=33 -ASC_=34 -ATTACH_=35 -AUTOINCREMENT_=36 -BEFORE_=37 -BEGIN_=38 -BETWEEN_=39 -BY_=40 -CASCADE_=41 -CASE_=42 -CAST_=43 -CHECK_=44 -COLLATE_=45 -COLUMN_=46 -COMMIT_=47 -CONFLICT_=48 -CONSTRAINT_=49 -CREATE_=50 -CROSS_=51 -CURRENT_DATE_=52 -CURRENT_TIME_=53 -CURRENT_TIMESTAMP_=54 -DATABASE_=55 -DEFAULT_=56 -DEFERRABLE_=57 -DEFERRED_=58 -DELETE_=59 -DESC_=60 -DETACH_=61 -DISTINCT_=62 -DROP_=63 -EACH_=64 -ELSE_=65 -END_=66 -ESCAPE_=67 -EXCEPT_=68 -EXCLUSIVE_=69 -EXISTS_=70 -EXPLAIN_=71 -FAIL_=72 -FOR_=73 -FOREIGN_=74 -FROM_=75 -FULL_=76 -GLOB_=77 -GROUP_=78 -HAVING_=79 -IF_=80 -IGNORE_=81 -IMMEDIATE_=82 -IN_=83 -INDEX_=84 -INDEXED_=85 -INITIALLY_=86 -INNER_=87 -INSERT_=88 -INSTEAD_=89 -INTERSECT_=90 -INTO_=91 -IS_=92 -ISNULL_=93 -JOIN_=94 -KEY_=95 -LEFT_=96 -LIKE_=97 -LIMIT_=98 -MATCH_=99 -NATURAL_=100 -NO_=101 -NOT_=102 -NOTNULL_=103 -NULL_=104 -OF_=105 -OFFSET_=106 -ON_=107 -OR_=108 -ORDER_=109 -OUTER_=110 -PLAN_=111 -PRAGMA_=112 -PRIMARY_=113 -QUERY_=114 -RAISE_=115 -RECURSIVE_=116 -REFERENCES_=117 -REGEXP_=118 -REINDEX_=119 -RELEASE_=120 -RENAME_=121 -REPLACE_=122 -RESTRICT_=123 -RETURNING_=124 -RIGHT_=125 -ROLLBACK_=126 -ROW_=127 -ROWS_=128 -SAVEPOINT_=129 -SELECT_=130 -SET_=131 -STRICT_=132 -TABLE_=133 -TEMP_=134 -TEMPORARY_=135 -THEN_=136 -TO_=137 -TRANSACTION_=138 -TRIGGER_=139 -UNION_=140 -UNIQUE_=141 -UPDATE_=142 -USING_=143 -VACUUM_=144 -VALUES_=145 -VIEW_=146 -VIRTUAL_=147 -WHEN_=148 -WHERE_=149 -WITH_=150 -WITHOUT_=151 -FIRST_VALUE_=152 -OVER_=153 -PARTITION_=154 -RANGE_=155 -PRECEDING_=156 -UNBOUNDED_=157 -CURRENT_=158 -FOLLOWING_=159 -CUME_DIST_=160 -DENSE_RANK_=161 -LAG_=162 -LAST_VALUE_=163 -LEAD_=164 -NTH_VALUE_=165 -NTILE_=166 -PERCENT_RANK_=167 -RANK_=168 -ROW_NUMBER_=169 -GENERATED_=170 -ALWAYS_=171 -STORED_=172 -TRUE_=173 -FALSE_=174 -WINDOW_=175 -NULLS_=176 -FIRST_=177 -LAST_=178 -FILTER_=179 -GROUPS_=180 -EXCLUDE_=181 -TIES_=182 -OTHERS_=183 -DO_=184 -NOTHING_=185 -IDENTIFIER=186 -NUMERIC_LITERAL=187 -NUMBERED_BIND_PARAMETER=188 -NAMED_BIND_PARAMETER=189 -STRING_LITERAL=190 -BLOB_LITERAL=191 -SINGLE_LINE_COMMENT=192 -MULTILINE_COMMENT=193 -SPACES=194 -UNEXPECTED_CHAR=195 +PTR2=9 +PTR=10 +MINUS=11 +TILDE=12 +PIPE2=13 +DIV=14 +MOD=15 +LT2=16 +GT2=17 +AMP=18 +PIPE=19 +LT=20 +LT_EQ=21 +GT=22 +GT_EQ=23 +EQ=24 +NOT_EQ1=25 +NOT_EQ2=26 +ABORT_=27 +ACTION_=28 +ADD_=29 +AFTER_=30 +ALL_=31 +ALTER_=32 +ANALYZE_=33 +AND_=34 +AS_=35 +ASC_=36 +ATTACH_=37 +AUTOINCREMENT_=38 +BEFORE_=39 +BEGIN_=40 +BETWEEN_=41 +BY_=42 +CASCADE_=43 +CASE_=44 +CAST_=45 +CHECK_=46 +COLLATE_=47 +COLUMN_=48 +COMMIT_=49 +CONFLICT_=50 +CONSTRAINT_=51 +CREATE_=52 +CROSS_=53 +CURRENT_DATE_=54 +CURRENT_TIME_=55 +CURRENT_TIMESTAMP_=56 +DATABASE_=57 +DEFAULT_=58 +DEFERRABLE_=59 +DEFERRED_=60 +DELETE_=61 +DESC_=62 +DETACH_=63 +DISTINCT_=64 +DROP_=65 +EACH_=66 +ELSE_=67 +END_=68 +ESCAPE_=69 +EXCEPT_=70 +EXCLUSIVE_=71 +EXISTS_=72 +EXPLAIN_=73 +FAIL_=74 +FOR_=75 +FOREIGN_=76 +FROM_=77 +FULL_=78 +GLOB_=79 +GROUP_=80 +HAVING_=81 +IF_=82 +IGNORE_=83 +IMMEDIATE_=84 +IN_=85 +INDEX_=86 +INDEXED_=87 +INITIALLY_=88 +INNER_=89 +INSERT_=90 +INSTEAD_=91 +INTERSECT_=92 +INTO_=93 +IS_=94 +ISNULL_=95 +JOIN_=96 +KEY_=97 +LEFT_=98 +LIKE_=99 +LIMIT_=100 +MATCH_=101 +NATURAL_=102 +NO_=103 +NOT_=104 +NOTNULL_=105 +NULL_=106 +OF_=107 +OFFSET_=108 +ON_=109 +OR_=110 +ORDER_=111 +OUTER_=112 +PLAN_=113 +PRAGMA_=114 +PRIMARY_=115 +QUERY_=116 +RAISE_=117 +RECURSIVE_=118 +REFERENCES_=119 +REGEXP_=120 +REINDEX_=121 +RELEASE_=122 +RENAME_=123 +REPLACE_=124 +RESTRICT_=125 +RETURNING_=126 +RIGHT_=127 +ROLLBACK_=128 +ROW_=129 +ROWS_=130 +SAVEPOINT_=131 +SELECT_=132 +SET_=133 +STRICT_=134 +TABLE_=135 +TEMP_=136 +TEMPORARY_=137 +THEN_=138 +TO_=139 +TRANSACTION_=140 +TRIGGER_=141 +UNION_=142 +UNIQUE_=143 +UPDATE_=144 +USING_=145 +VACUUM_=146 +VALUES_=147 +VIEW_=148 +VIRTUAL_=149 +WHEN_=150 +WHERE_=151 +WITH_=152 +WITHOUT_=153 +FIRST_VALUE_=154 +OVER_=155 +PARTITION_=156 +RANGE_=157 +PRECEDING_=158 +UNBOUNDED_=159 +CURRENT_=160 +FOLLOWING_=161 +CUME_DIST_=162 +DENSE_RANK_=163 +LAG_=164 +LAST_VALUE_=165 +LEAD_=166 +NTH_VALUE_=167 +NTILE_=168 +PERCENT_RANK_=169 +RANK_=170 +ROW_NUMBER_=171 +GENERATED_=172 +ALWAYS_=173 +STORED_=174 +TRUE_=175 +FALSE_=176 +WINDOW_=177 +NULLS_=178 +FIRST_=179 +LAST_=180 +FILTER_=181 +GROUPS_=182 +EXCLUDE_=183 +TIES_=184 +OTHERS_=185 +DO_=186 +NOTHING_=187 +IDENTIFIER=188 +NUMERIC_LITERAL=189 +NUMBERED_BIND_PARAMETER=190 +NAMED_BIND_PARAMETER=191 +STRING_LITERAL=192 +BLOB_LITERAL=193 +SINGLE_LINE_COMMENT=194 +MULTILINE_COMMENT=195 +SPACES=196 +UNEXPECTED_CHAR=197 ';'=1 '.'=2 '('=3 @@ -201,19 +203,21 @@ UNEXPECTED_CHAR=195 '='=6 '*'=7 '+'=8 -'-'=9 -'~'=10 -'||'=11 -'/'=12 -'%'=13 -'<<'=14 -'>>'=15 -'&'=16 -'|'=17 -'<'=18 -'<='=19 -'>'=20 -'>='=21 -'=='=22 -'!='=23 -'<>'=24 +'->>'=9 +'->'=10 +'-'=11 +'~'=12 +'||'=13 +'/'=14 +'%'=15 +'<<'=16 +'>>'=17 +'&'=18 +'|'=19 +'<'=20 +'<='=21 +'>'=22 +'>='=23 +'=='=24 +'!='=25 +'<>'=26 diff --git a/internal/engine/sqlite/parser/sqlite_lexer.go b/internal/engine/sqlite/parser/sqlite_lexer.go index c2b35200b4..d3cfd14f1e 100644 --- a/internal/engine/sqlite/parser/sqlite_lexer.go +++ b/internal/engine/sqlite/parser/sqlite_lexer.go @@ -1,13 +1,12 @@ -// Code generated from SQLiteLexer.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from SQLiteLexer.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser import ( "fmt" + "github.com/antlr4-go/antlr/v4" "sync" "unicode" - - "github.com/antlr/antlr4/runtime/Go/antlr/v4" ) // Suppress unused import error @@ -22,101 +21,101 @@ type SQLiteLexer struct { // TODO: EOF string } -var sqlitelexerLexerStaticData struct { +var SQLiteLexerLexerStaticData struct { once sync.Once serializedATN []int32 - channelNames []string - modeNames []string - literalNames []string - symbolicNames []string - ruleNames []string - predictionContextCache *antlr.PredictionContextCache + ChannelNames []string + ModeNames []string + LiteralNames []string + SymbolicNames []string + RuleNames []string + PredictionContextCache *antlr.PredictionContextCache atn *antlr.ATN decisionToDFA []*antlr.DFA } func sqlitelexerLexerInit() { - staticData := &sqlitelexerLexerStaticData - staticData.channelNames = []string{ + staticData := &SQLiteLexerLexerStaticData + staticData.ChannelNames = []string{ "DEFAULT_TOKEN_CHANNEL", "HIDDEN", } - staticData.modeNames = []string{ + staticData.ModeNames = []string{ "DEFAULT_MODE", } - staticData.literalNames = []string{ - "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'-'", "'~'", - "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", "'<'", "'<='", "'>'", - "'>='", "'=='", "'!='", "'<>'", + staticData.LiteralNames = []string{ + "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'", + "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", + "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'", } - staticData.symbolicNames = []string{ + staticData.SymbolicNames = []string{ "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", - "PLUS", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", "AMP", - "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", "NOT_EQ2", "ABORT_", - "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", "AND_", "AS_", - "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", "BEGIN_", "BETWEEN_", - "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", "COLLATE_", "COLUMN_", - "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", "CROSS_", "CURRENT_DATE_", - "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", "DEFAULT_", "DEFERRABLE_", - "DEFERRED_", "DELETE_", "DESC_", "DETACH_", "DISTINCT_", "DROP_", "EACH_", - "ELSE_", "END_", "ESCAPE_", "EXCEPT_", "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", - "FAIL_", "FOR_", "FOREIGN_", "FROM_", "FULL_", "GLOB_", "GROUP_", "HAVING_", - "IF_", "IGNORE_", "IMMEDIATE_", "IN_", "INDEX_", "INDEXED_", "INITIALLY_", - "INNER_", "INSERT_", "INSTEAD_", "INTERSECT_", "INTO_", "IS_", "ISNULL_", - "JOIN_", "KEY_", "LEFT_", "LIKE_", "LIMIT_", "MATCH_", "NATURAL_", "NO_", - "NOT_", "NOTNULL_", "NULL_", "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", - "OUTER_", "PLAN_", "PRAGMA_", "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", - "REFERENCES_", "REGEXP_", "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", - "RESTRICT_", "RETURNING_", "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", - "SELECT_", "SET_", "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", - "TO_", "TRANSACTION_", "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", - "VACUUM_", "VALUES_", "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", - "WITHOUT_", "FIRST_VALUE_", "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", - "UNBOUNDED_", "CURRENT_", "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", - "LAG_", "LAST_VALUE_", "LEAD_", "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", - "RANK_", "ROW_NUMBER_", "GENERATED_", "ALWAYS_", "STORED_", "TRUE_", - "FALSE_", "WINDOW_", "NULLS_", "FIRST_", "LAST_", "FILTER_", "GROUPS_", - "EXCLUDE_", "TIES_", "OTHERS_", "DO_", "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", - "NUMBERED_BIND_PARAMETER", "NAMED_BIND_PARAMETER", "STRING_LITERAL", - "BLOB_LITERAL", "SINGLE_LINE_COMMENT", "MULTILINE_COMMENT", "SPACES", - "UNEXPECTED_CHAR", + "PLUS", "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", + "GT2", "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", + "NOT_EQ2", "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", + "ANALYZE_", "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", + "BEGIN_", "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", + "COLLATE_", "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", + "CROSS_", "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", + "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_", + "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_", + "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_", + "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_", + "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_", + "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_", + "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_", + "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_", + "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_", + "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_", + "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_", + "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_", + "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_", + "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_", + "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_", + "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_", + "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_", + "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_", + "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_", + "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER", + "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT", + "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR", } - staticData.ruleNames = []string{ + staticData.RuleNames = []string{ "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", "PLUS", - "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", "AMP", "PIPE", - "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", "NOT_EQ2", "ABORT_", - "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", "AND_", "AS_", - "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", "BEGIN_", "BETWEEN_", - "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", "COLLATE_", "COLUMN_", - "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", "CROSS_", "CURRENT_DATE_", - "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", "DEFAULT_", "DEFERRABLE_", - "DEFERRED_", "DELETE_", "DESC_", "DETACH_", "DISTINCT_", "DROP_", "EACH_", - "ELSE_", "END_", "ESCAPE_", "EXCEPT_", "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", - "FAIL_", "FOR_", "FOREIGN_", "FROM_", "FULL_", "GLOB_", "GROUP_", "HAVING_", - "IF_", "IGNORE_", "IMMEDIATE_", "IN_", "INDEX_", "INDEXED_", "INITIALLY_", - "INNER_", "INSERT_", "INSTEAD_", "INTERSECT_", "INTO_", "IS_", "ISNULL_", - "JOIN_", "KEY_", "LEFT_", "LIKE_", "LIMIT_", "MATCH_", "NATURAL_", "NO_", - "NOT_", "NOTNULL_", "NULL_", "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", - "OUTER_", "PLAN_", "PRAGMA_", "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", - "REFERENCES_", "REGEXP_", "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", - "RESTRICT_", "RETURNING_", "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", - "SELECT_", "SET_", "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", - "TO_", "TRANSACTION_", "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", - "VACUUM_", "VALUES_", "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", - "WITHOUT_", "FIRST_VALUE_", "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", - "UNBOUNDED_", "CURRENT_", "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", - "LAG_", "LAST_VALUE_", "LEAD_", "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", - "RANK_", "ROW_NUMBER_", "GENERATED_", "ALWAYS_", "STORED_", "TRUE_", - "FALSE_", "WINDOW_", "NULLS_", "FIRST_", "LAST_", "FILTER_", "GROUPS_", - "EXCLUDE_", "TIES_", "OTHERS_", "DO_", "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", - "NUMBERED_BIND_PARAMETER", "NAMED_BIND_PARAMETER", "STRING_LITERAL", - "BLOB_LITERAL", "SINGLE_LINE_COMMENT", "MULTILINE_COMMENT", "SPACES", - "UNEXPECTED_CHAR", "HEX_DIGIT", "DIGIT", "A", "B", "C", "D", "E", "F", - "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", - "U", "V", "W", "X", "Y", "Z", + "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", + "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", "NOT_EQ2", + "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", + "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", "BEGIN_", + "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", "COLLATE_", + "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", "CROSS_", + "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", + "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_", + "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_", + "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_", + "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_", + "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_", + "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_", + "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_", + "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_", + "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_", + "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_", + "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_", + "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_", + "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_", + "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_", + "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_", + "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_", + "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_", + "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_", + "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_", + "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER", + "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT", + "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR", "HEX_DIGIT", "DIGIT", + "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", + "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", } - staticData.predictionContextCache = antlr.NewPredictionContextCache() + staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 0, 195, 1818, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, + 4, 0, 197, 1829, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, @@ -162,812 +161,817 @@ func sqlitelexerLexerInit() { 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, - 2, 221, 7, 221, 2, 222, 7, 222, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, - 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, - 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, - 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, - 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, - 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, - 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, - 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, - 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, - 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, - 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, - 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, - 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, - 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, - 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, - 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, - 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, - 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, - 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, - 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, - 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, - 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, - 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, - 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, - 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, - 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, - 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, - 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, - 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, - 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, - 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, - 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, - 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, - 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, - 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, - 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, - 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, - 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, - 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, - 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, - 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, - 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, - 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, - 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, - 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, - 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, - 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, - 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, - 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, - 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, - 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, - 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, - 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, - 1, 99, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, - 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, - 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, - 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, - 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, - 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, - 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, - 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, - 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, - 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, - 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, - 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, - 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, - 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, - 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, - 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, - 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, - 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, - 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, - 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, - 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, - 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, - 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, - 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, - 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, - 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, - 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, - 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, - 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, - 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, - 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, - 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, - 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, - 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, - 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, - 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, - 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, - 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, - 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, - 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, - 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, - 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, - 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, - 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, - 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, - 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, - 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, - 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, - 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, - 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, - 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, - 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, - 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, - 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, - 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, - 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, - 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, - 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, - 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, - 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, - 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, - 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, - 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, - 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, - 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, - 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, - 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 5, 185, - 1625, 8, 185, 10, 185, 12, 185, 1628, 9, 185, 1, 185, 1, 185, 1, 185, 1, - 185, 1, 185, 5, 185, 1635, 8, 185, 10, 185, 12, 185, 1638, 9, 185, 1, 185, - 1, 185, 1, 185, 5, 185, 1643, 8, 185, 10, 185, 12, 185, 1646, 9, 185, 1, - 185, 1, 185, 1, 185, 5, 185, 1651, 8, 185, 10, 185, 12, 185, 1654, 9, 185, - 3, 185, 1656, 8, 185, 1, 186, 4, 186, 1659, 8, 186, 11, 186, 12, 186, 1660, - 1, 186, 1, 186, 5, 186, 1665, 8, 186, 10, 186, 12, 186, 1668, 9, 186, 3, - 186, 1670, 8, 186, 1, 186, 1, 186, 4, 186, 1674, 8, 186, 11, 186, 12, 186, - 1675, 3, 186, 1678, 8, 186, 1, 186, 1, 186, 3, 186, 1682, 8, 186, 1, 186, - 4, 186, 1685, 8, 186, 11, 186, 12, 186, 1686, 3, 186, 1689, 8, 186, 1, - 186, 1, 186, 1, 186, 1, 186, 4, 186, 1695, 8, 186, 11, 186, 12, 186, 1696, - 3, 186, 1699, 8, 186, 1, 187, 1, 187, 5, 187, 1703, 8, 187, 10, 187, 12, - 187, 1706, 9, 187, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 189, - 5, 189, 1715, 8, 189, 10, 189, 12, 189, 1718, 9, 189, 1, 189, 1, 189, 1, - 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 5, 191, 1729, 8, 191, - 10, 191, 12, 191, 1732, 9, 191, 1, 191, 3, 191, 1735, 8, 191, 1, 191, 1, - 191, 3, 191, 1739, 8, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 192, - 5, 192, 1747, 8, 192, 10, 192, 12, 192, 1750, 9, 192, 1, 192, 1, 192, 1, - 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, + 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 1, 0, 1, + 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, + 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, + 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, + 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, + 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, + 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, + 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, + 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, + 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, + 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, + 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, + 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, + 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, + 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, + 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, + 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, + 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, + 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, + 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, + 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, + 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, + 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, + 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, + 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, + 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, + 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, + 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, + 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, + 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, + 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, + 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, + 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, + 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, + 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, + 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, + 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, + 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, + 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, + 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, + 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, + 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, + 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 82, 1, + 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, + 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, + 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, + 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, + 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, + 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, + 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, + 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, + 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, + 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, + 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, + 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, + 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, + 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, + 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, + 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, + 108, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, + 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, + 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, + 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, + 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, + 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, + 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, + 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, + 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, + 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, + 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, + 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, + 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, + 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, + 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, + 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, + 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, + 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, + 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, + 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, + 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, + 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, + 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, + 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, + 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, + 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, + 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, + 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, + 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, + 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, + 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, + 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, + 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, + 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, + 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, + 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, + 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, + 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, + 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, + 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, + 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, + 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, + 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, + 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, + 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, + 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, + 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, + 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, + 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, + 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, + 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, + 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, + 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, + 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, + 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, + 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, + 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, + 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, + 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, + 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, + 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, + 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 186, 1, + 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, + 187, 1, 187, 5, 187, 1636, 8, 187, 10, 187, 12, 187, 1639, 9, 187, 1, 187, + 1, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1646, 8, 187, 10, 187, 12, 187, + 1649, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1654, 8, 187, 10, 187, 12, + 187, 1657, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1662, 8, 187, 10, 187, + 12, 187, 1665, 9, 187, 3, 187, 1667, 8, 187, 1, 188, 4, 188, 1670, 8, 188, + 11, 188, 12, 188, 1671, 1, 188, 1, 188, 5, 188, 1676, 8, 188, 10, 188, + 12, 188, 1679, 9, 188, 3, 188, 1681, 8, 188, 1, 188, 1, 188, 4, 188, 1685, + 8, 188, 11, 188, 12, 188, 1686, 3, 188, 1689, 8, 188, 1, 188, 1, 188, 3, + 188, 1693, 8, 188, 1, 188, 4, 188, 1696, 8, 188, 11, 188, 12, 188, 1697, + 3, 188, 1700, 8, 188, 1, 188, 1, 188, 1, 188, 1, 188, 4, 188, 1706, 8, + 188, 11, 188, 12, 188, 1707, 3, 188, 1710, 8, 188, 1, 189, 1, 189, 5, 189, + 1714, 8, 189, 10, 189, 12, 189, 1717, 9, 189, 1, 190, 1, 190, 1, 190, 1, + 191, 1, 191, 1, 191, 1, 191, 5, 191, 1726, 8, 191, 10, 191, 12, 191, 1729, + 9, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, + 1, 193, 5, 193, 1740, 8, 193, 10, 193, 12, 193, 1743, 9, 193, 1, 193, 3, + 193, 1746, 8, 193, 1, 193, 1, 193, 3, 193, 1750, 8, 193, 1, 193, 1, 193, + 1, 194, 1, 194, 1, 194, 1, 194, 5, 194, 1758, 8, 194, 10, 194, 12, 194, + 1761, 9, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 196, 1, 196, 1, 197, 1, 197, 1, 198, 1, 198, 1, 199, 1, 199, 1, 200, 1, 200, 1, 201, 1, 201, 1, 202, 1, 202, 1, 203, 1, 203, 1, 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 1, 207, 1, 207, 1, 208, 1, 208, 1, 209, 1, 209, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, 213, 1, 213, 1, 214, 1, 214, 1, 215, 1, 215, 1, 216, 1, 216, 1, 217, 1, 217, 1, 218, 1, 218, 1, 219, 1, 219, 1, 220, 1, 220, 1, 221, 1, 221, 1, - 222, 1, 222, 1, 1748, 0, 223, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, - 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, - 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, - 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, - 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, - 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, - 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, - 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, - 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, - 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, - 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, - 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, - 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, - 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, - 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, - 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, - 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, - 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, - 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, - 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, - 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, - 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, - 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, - 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, - 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 0, 393, 0, 395, - 0, 397, 0, 399, 0, 401, 0, 403, 0, 405, 0, 407, 0, 409, 0, 411, 0, 413, - 0, 415, 0, 417, 0, 419, 0, 421, 0, 423, 0, 425, 0, 427, 0, 429, 0, 431, - 0, 433, 0, 435, 0, 437, 0, 439, 0, 441, 0, 443, 0, 445, 0, 1, 0, 38, 1, - 0, 34, 34, 1, 0, 96, 96, 1, 0, 93, 93, 3, 0, 65, 90, 95, 95, 97, 122, 4, - 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 43, 43, 45, 45, 3, 0, 36, 36, - 58, 58, 64, 64, 1, 0, 39, 39, 2, 0, 10, 10, 13, 13, 3, 0, 9, 11, 13, 13, - 32, 32, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 57, 2, 0, 65, 65, 97, - 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, - 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, - 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, - 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, - 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, - 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, - 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, - 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, - 2, 0, 90, 90, 122, 122, 1815, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, - 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, - 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, - 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, - 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, - 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, - 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, - 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, - 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, - 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, - 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, - 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, - 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, - 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, - 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, - 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, - 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, - 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, - 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, - 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, - 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, - 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, - 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, - 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, - 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, - 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, - 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, - 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, - 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, - 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, - 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, - 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, - 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, - 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, - 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, - 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, - 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, - 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, - 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, - 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, - 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, - 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, - 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, - 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, - 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, - 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, - 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, - 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, - 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, - 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, - 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, - 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, - 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, - 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 1, 447, 1, 0, 0, 0, 3, - 449, 1, 0, 0, 0, 5, 451, 1, 0, 0, 0, 7, 453, 1, 0, 0, 0, 9, 455, 1, 0, - 0, 0, 11, 457, 1, 0, 0, 0, 13, 459, 1, 0, 0, 0, 15, 461, 1, 0, 0, 0, 17, - 463, 1, 0, 0, 0, 19, 465, 1, 0, 0, 0, 21, 467, 1, 0, 0, 0, 23, 470, 1, - 0, 0, 0, 25, 472, 1, 0, 0, 0, 27, 474, 1, 0, 0, 0, 29, 477, 1, 0, 0, 0, - 31, 480, 1, 0, 0, 0, 33, 482, 1, 0, 0, 0, 35, 484, 1, 0, 0, 0, 37, 486, - 1, 0, 0, 0, 39, 489, 1, 0, 0, 0, 41, 491, 1, 0, 0, 0, 43, 494, 1, 0, 0, - 0, 45, 497, 1, 0, 0, 0, 47, 500, 1, 0, 0, 0, 49, 503, 1, 0, 0, 0, 51, 509, - 1, 0, 0, 0, 53, 516, 1, 0, 0, 0, 55, 520, 1, 0, 0, 0, 57, 526, 1, 0, 0, - 0, 59, 530, 1, 0, 0, 0, 61, 536, 1, 0, 0, 0, 63, 544, 1, 0, 0, 0, 65, 548, - 1, 0, 0, 0, 67, 551, 1, 0, 0, 0, 69, 555, 1, 0, 0, 0, 71, 562, 1, 0, 0, - 0, 73, 576, 1, 0, 0, 0, 75, 583, 1, 0, 0, 0, 77, 589, 1, 0, 0, 0, 79, 597, - 1, 0, 0, 0, 81, 600, 1, 0, 0, 0, 83, 608, 1, 0, 0, 0, 85, 613, 1, 0, 0, - 0, 87, 618, 1, 0, 0, 0, 89, 624, 1, 0, 0, 0, 91, 632, 1, 0, 0, 0, 93, 639, - 1, 0, 0, 0, 95, 646, 1, 0, 0, 0, 97, 655, 1, 0, 0, 0, 99, 666, 1, 0, 0, - 0, 101, 673, 1, 0, 0, 0, 103, 679, 1, 0, 0, 0, 105, 692, 1, 0, 0, 0, 107, - 705, 1, 0, 0, 0, 109, 723, 1, 0, 0, 0, 111, 732, 1, 0, 0, 0, 113, 740, - 1, 0, 0, 0, 115, 751, 1, 0, 0, 0, 117, 760, 1, 0, 0, 0, 119, 767, 1, 0, - 0, 0, 121, 772, 1, 0, 0, 0, 123, 779, 1, 0, 0, 0, 125, 788, 1, 0, 0, 0, - 127, 793, 1, 0, 0, 0, 129, 798, 1, 0, 0, 0, 131, 803, 1, 0, 0, 0, 133, - 807, 1, 0, 0, 0, 135, 814, 1, 0, 0, 0, 137, 821, 1, 0, 0, 0, 139, 831, - 1, 0, 0, 0, 141, 838, 1, 0, 0, 0, 143, 846, 1, 0, 0, 0, 145, 851, 1, 0, - 0, 0, 147, 855, 1, 0, 0, 0, 149, 863, 1, 0, 0, 0, 151, 868, 1, 0, 0, 0, - 153, 873, 1, 0, 0, 0, 155, 878, 1, 0, 0, 0, 157, 884, 1, 0, 0, 0, 159, - 891, 1, 0, 0, 0, 161, 894, 1, 0, 0, 0, 163, 901, 1, 0, 0, 0, 165, 911, - 1, 0, 0, 0, 167, 914, 1, 0, 0, 0, 169, 920, 1, 0, 0, 0, 171, 928, 1, 0, - 0, 0, 173, 938, 1, 0, 0, 0, 175, 944, 1, 0, 0, 0, 177, 951, 1, 0, 0, 0, - 179, 959, 1, 0, 0, 0, 181, 969, 1, 0, 0, 0, 183, 974, 1, 0, 0, 0, 185, - 977, 1, 0, 0, 0, 187, 984, 1, 0, 0, 0, 189, 989, 1, 0, 0, 0, 191, 993, - 1, 0, 0, 0, 193, 998, 1, 0, 0, 0, 195, 1003, 1, 0, 0, 0, 197, 1009, 1, - 0, 0, 0, 199, 1015, 1, 0, 0, 0, 201, 1023, 1, 0, 0, 0, 203, 1026, 1, 0, - 0, 0, 205, 1030, 1, 0, 0, 0, 207, 1038, 1, 0, 0, 0, 209, 1043, 1, 0, 0, - 0, 211, 1046, 1, 0, 0, 0, 213, 1053, 1, 0, 0, 0, 215, 1056, 1, 0, 0, 0, - 217, 1059, 1, 0, 0, 0, 219, 1065, 1, 0, 0, 0, 221, 1071, 1, 0, 0, 0, 223, - 1076, 1, 0, 0, 0, 225, 1083, 1, 0, 0, 0, 227, 1091, 1, 0, 0, 0, 229, 1097, - 1, 0, 0, 0, 231, 1103, 1, 0, 0, 0, 233, 1113, 1, 0, 0, 0, 235, 1124, 1, - 0, 0, 0, 237, 1131, 1, 0, 0, 0, 239, 1139, 1, 0, 0, 0, 241, 1147, 1, 0, - 0, 0, 243, 1154, 1, 0, 0, 0, 245, 1162, 1, 0, 0, 0, 247, 1171, 1, 0, 0, - 0, 249, 1181, 1, 0, 0, 0, 251, 1187, 1, 0, 0, 0, 253, 1196, 1, 0, 0, 0, - 255, 1200, 1, 0, 0, 0, 257, 1205, 1, 0, 0, 0, 259, 1215, 1, 0, 0, 0, 261, - 1222, 1, 0, 0, 0, 263, 1226, 1, 0, 0, 0, 265, 1233, 1, 0, 0, 0, 267, 1239, - 1, 0, 0, 0, 269, 1244, 1, 0, 0, 0, 271, 1254, 1, 0, 0, 0, 273, 1259, 1, - 0, 0, 0, 275, 1262, 1, 0, 0, 0, 277, 1274, 1, 0, 0, 0, 279, 1282, 1, 0, - 0, 0, 281, 1288, 1, 0, 0, 0, 283, 1295, 1, 0, 0, 0, 285, 1302, 1, 0, 0, - 0, 287, 1308, 1, 0, 0, 0, 289, 1315, 1, 0, 0, 0, 291, 1322, 1, 0, 0, 0, - 293, 1327, 1, 0, 0, 0, 295, 1335, 1, 0, 0, 0, 297, 1340, 1, 0, 0, 0, 299, - 1346, 1, 0, 0, 0, 301, 1351, 1, 0, 0, 0, 303, 1359, 1, 0, 0, 0, 305, 1371, - 1, 0, 0, 0, 307, 1376, 1, 0, 0, 0, 309, 1386, 1, 0, 0, 0, 311, 1392, 1, - 0, 0, 0, 313, 1402, 1, 0, 0, 0, 315, 1412, 1, 0, 0, 0, 317, 1420, 1, 0, - 0, 0, 319, 1430, 1, 0, 0, 0, 321, 1440, 1, 0, 0, 0, 323, 1451, 1, 0, 0, - 0, 325, 1455, 1, 0, 0, 0, 327, 1466, 1, 0, 0, 0, 329, 1471, 1, 0, 0, 0, - 331, 1481, 1, 0, 0, 0, 333, 1487, 1, 0, 0, 0, 335, 1500, 1, 0, 0, 0, 337, - 1505, 1, 0, 0, 0, 339, 1516, 1, 0, 0, 0, 341, 1526, 1, 0, 0, 0, 343, 1533, - 1, 0, 0, 0, 345, 1540, 1, 0, 0, 0, 347, 1545, 1, 0, 0, 0, 349, 1551, 1, - 0, 0, 0, 351, 1558, 1, 0, 0, 0, 353, 1564, 1, 0, 0, 0, 355, 1570, 1, 0, - 0, 0, 357, 1575, 1, 0, 0, 0, 359, 1582, 1, 0, 0, 0, 361, 1589, 1, 0, 0, - 0, 363, 1597, 1, 0, 0, 0, 365, 1602, 1, 0, 0, 0, 367, 1609, 1, 0, 0, 0, - 369, 1612, 1, 0, 0, 0, 371, 1655, 1, 0, 0, 0, 373, 1698, 1, 0, 0, 0, 375, - 1700, 1, 0, 0, 0, 377, 1707, 1, 0, 0, 0, 379, 1710, 1, 0, 0, 0, 381, 1721, - 1, 0, 0, 0, 383, 1724, 1, 0, 0, 0, 385, 1742, 1, 0, 0, 0, 387, 1756, 1, - 0, 0, 0, 389, 1760, 1, 0, 0, 0, 391, 1762, 1, 0, 0, 0, 393, 1764, 1, 0, - 0, 0, 395, 1766, 1, 0, 0, 0, 397, 1768, 1, 0, 0, 0, 399, 1770, 1, 0, 0, - 0, 401, 1772, 1, 0, 0, 0, 403, 1774, 1, 0, 0, 0, 405, 1776, 1, 0, 0, 0, - 407, 1778, 1, 0, 0, 0, 409, 1780, 1, 0, 0, 0, 411, 1782, 1, 0, 0, 0, 413, - 1784, 1, 0, 0, 0, 415, 1786, 1, 0, 0, 0, 417, 1788, 1, 0, 0, 0, 419, 1790, - 1, 0, 0, 0, 421, 1792, 1, 0, 0, 0, 423, 1794, 1, 0, 0, 0, 425, 1796, 1, - 0, 0, 0, 427, 1798, 1, 0, 0, 0, 429, 1800, 1, 0, 0, 0, 431, 1802, 1, 0, - 0, 0, 433, 1804, 1, 0, 0, 0, 435, 1806, 1, 0, 0, 0, 437, 1808, 1, 0, 0, - 0, 439, 1810, 1, 0, 0, 0, 441, 1812, 1, 0, 0, 0, 443, 1814, 1, 0, 0, 0, - 445, 1816, 1, 0, 0, 0, 447, 448, 5, 59, 0, 0, 448, 2, 1, 0, 0, 0, 449, - 450, 5, 46, 0, 0, 450, 4, 1, 0, 0, 0, 451, 452, 5, 40, 0, 0, 452, 6, 1, - 0, 0, 0, 453, 454, 5, 41, 0, 0, 454, 8, 1, 0, 0, 0, 455, 456, 5, 44, 0, - 0, 456, 10, 1, 0, 0, 0, 457, 458, 5, 61, 0, 0, 458, 12, 1, 0, 0, 0, 459, - 460, 5, 42, 0, 0, 460, 14, 1, 0, 0, 0, 461, 462, 5, 43, 0, 0, 462, 16, - 1, 0, 0, 0, 463, 464, 5, 45, 0, 0, 464, 18, 1, 0, 0, 0, 465, 466, 5, 126, - 0, 0, 466, 20, 1, 0, 0, 0, 467, 468, 5, 124, 0, 0, 468, 469, 5, 124, 0, - 0, 469, 22, 1, 0, 0, 0, 470, 471, 5, 47, 0, 0, 471, 24, 1, 0, 0, 0, 472, - 473, 5, 37, 0, 0, 473, 26, 1, 0, 0, 0, 474, 475, 5, 60, 0, 0, 475, 476, - 5, 60, 0, 0, 476, 28, 1, 0, 0, 0, 477, 478, 5, 62, 0, 0, 478, 479, 5, 62, - 0, 0, 479, 30, 1, 0, 0, 0, 480, 481, 5, 38, 0, 0, 481, 32, 1, 0, 0, 0, - 482, 483, 5, 124, 0, 0, 483, 34, 1, 0, 0, 0, 484, 485, 5, 60, 0, 0, 485, - 36, 1, 0, 0, 0, 486, 487, 5, 60, 0, 0, 487, 488, 5, 61, 0, 0, 488, 38, - 1, 0, 0, 0, 489, 490, 5, 62, 0, 0, 490, 40, 1, 0, 0, 0, 491, 492, 5, 62, - 0, 0, 492, 493, 5, 61, 0, 0, 493, 42, 1, 0, 0, 0, 494, 495, 5, 61, 0, 0, - 495, 496, 5, 61, 0, 0, 496, 44, 1, 0, 0, 0, 497, 498, 5, 33, 0, 0, 498, - 499, 5, 61, 0, 0, 499, 46, 1, 0, 0, 0, 500, 501, 5, 60, 0, 0, 501, 502, - 5, 62, 0, 0, 502, 48, 1, 0, 0, 0, 503, 504, 3, 395, 197, 0, 504, 505, 3, - 397, 198, 0, 505, 506, 3, 423, 211, 0, 506, 507, 3, 429, 214, 0, 507, 508, - 3, 433, 216, 0, 508, 50, 1, 0, 0, 0, 509, 510, 3, 395, 197, 0, 510, 511, - 3, 399, 199, 0, 511, 512, 3, 433, 216, 0, 512, 513, 3, 411, 205, 0, 513, - 514, 3, 423, 211, 0, 514, 515, 3, 421, 210, 0, 515, 52, 1, 0, 0, 0, 516, - 517, 3, 395, 197, 0, 517, 518, 3, 401, 200, 0, 518, 519, 3, 401, 200, 0, - 519, 54, 1, 0, 0, 0, 520, 521, 3, 395, 197, 0, 521, 522, 3, 405, 202, 0, - 522, 523, 3, 433, 216, 0, 523, 524, 3, 403, 201, 0, 524, 525, 3, 429, 214, - 0, 525, 56, 1, 0, 0, 0, 526, 527, 3, 395, 197, 0, 527, 528, 3, 417, 208, - 0, 528, 529, 3, 417, 208, 0, 529, 58, 1, 0, 0, 0, 530, 531, 3, 395, 197, - 0, 531, 532, 3, 417, 208, 0, 532, 533, 3, 433, 216, 0, 533, 534, 3, 403, - 201, 0, 534, 535, 3, 429, 214, 0, 535, 60, 1, 0, 0, 0, 536, 537, 3, 395, - 197, 0, 537, 538, 3, 421, 210, 0, 538, 539, 3, 395, 197, 0, 539, 540, 3, - 417, 208, 0, 540, 541, 3, 443, 221, 0, 541, 542, 3, 445, 222, 0, 542, 543, - 3, 403, 201, 0, 543, 62, 1, 0, 0, 0, 544, 545, 3, 395, 197, 0, 545, 546, - 3, 421, 210, 0, 546, 547, 3, 401, 200, 0, 547, 64, 1, 0, 0, 0, 548, 549, - 3, 395, 197, 0, 549, 550, 3, 431, 215, 0, 550, 66, 1, 0, 0, 0, 551, 552, - 3, 395, 197, 0, 552, 553, 3, 431, 215, 0, 553, 554, 3, 399, 199, 0, 554, - 68, 1, 0, 0, 0, 555, 556, 3, 395, 197, 0, 556, 557, 3, 433, 216, 0, 557, - 558, 3, 433, 216, 0, 558, 559, 3, 395, 197, 0, 559, 560, 3, 399, 199, 0, - 560, 561, 3, 409, 204, 0, 561, 70, 1, 0, 0, 0, 562, 563, 3, 395, 197, 0, - 563, 564, 3, 435, 217, 0, 564, 565, 3, 433, 216, 0, 565, 566, 3, 423, 211, - 0, 566, 567, 3, 411, 205, 0, 567, 568, 3, 421, 210, 0, 568, 569, 3, 399, - 199, 0, 569, 570, 3, 429, 214, 0, 570, 571, 3, 403, 201, 0, 571, 572, 3, - 419, 209, 0, 572, 573, 3, 403, 201, 0, 573, 574, 3, 421, 210, 0, 574, 575, - 3, 433, 216, 0, 575, 72, 1, 0, 0, 0, 576, 577, 3, 397, 198, 0, 577, 578, - 3, 403, 201, 0, 578, 579, 3, 405, 202, 0, 579, 580, 3, 423, 211, 0, 580, - 581, 3, 429, 214, 0, 581, 582, 3, 403, 201, 0, 582, 74, 1, 0, 0, 0, 583, - 584, 3, 397, 198, 0, 584, 585, 3, 403, 201, 0, 585, 586, 3, 407, 203, 0, - 586, 587, 3, 411, 205, 0, 587, 588, 3, 421, 210, 0, 588, 76, 1, 0, 0, 0, - 589, 590, 3, 397, 198, 0, 590, 591, 3, 403, 201, 0, 591, 592, 3, 433, 216, - 0, 592, 593, 3, 439, 219, 0, 593, 594, 3, 403, 201, 0, 594, 595, 3, 403, - 201, 0, 595, 596, 3, 421, 210, 0, 596, 78, 1, 0, 0, 0, 597, 598, 3, 397, - 198, 0, 598, 599, 3, 443, 221, 0, 599, 80, 1, 0, 0, 0, 600, 601, 3, 399, - 199, 0, 601, 602, 3, 395, 197, 0, 602, 603, 3, 431, 215, 0, 603, 604, 3, - 399, 199, 0, 604, 605, 3, 395, 197, 0, 605, 606, 3, 401, 200, 0, 606, 607, - 3, 403, 201, 0, 607, 82, 1, 0, 0, 0, 608, 609, 3, 399, 199, 0, 609, 610, - 3, 395, 197, 0, 610, 611, 3, 431, 215, 0, 611, 612, 3, 403, 201, 0, 612, - 84, 1, 0, 0, 0, 613, 614, 3, 399, 199, 0, 614, 615, 3, 395, 197, 0, 615, - 616, 3, 431, 215, 0, 616, 617, 3, 433, 216, 0, 617, 86, 1, 0, 0, 0, 618, - 619, 3, 399, 199, 0, 619, 620, 3, 409, 204, 0, 620, 621, 3, 403, 201, 0, - 621, 622, 3, 399, 199, 0, 622, 623, 3, 415, 207, 0, 623, 88, 1, 0, 0, 0, - 624, 625, 3, 399, 199, 0, 625, 626, 3, 423, 211, 0, 626, 627, 3, 417, 208, - 0, 627, 628, 3, 417, 208, 0, 628, 629, 3, 395, 197, 0, 629, 630, 3, 433, - 216, 0, 630, 631, 3, 403, 201, 0, 631, 90, 1, 0, 0, 0, 632, 633, 3, 399, - 199, 0, 633, 634, 3, 423, 211, 0, 634, 635, 3, 417, 208, 0, 635, 636, 3, - 435, 217, 0, 636, 637, 3, 419, 209, 0, 637, 638, 3, 421, 210, 0, 638, 92, - 1, 0, 0, 0, 639, 640, 3, 399, 199, 0, 640, 641, 3, 423, 211, 0, 641, 642, - 3, 419, 209, 0, 642, 643, 3, 419, 209, 0, 643, 644, 3, 411, 205, 0, 644, - 645, 3, 433, 216, 0, 645, 94, 1, 0, 0, 0, 646, 647, 3, 399, 199, 0, 647, - 648, 3, 423, 211, 0, 648, 649, 3, 421, 210, 0, 649, 650, 3, 405, 202, 0, - 650, 651, 3, 417, 208, 0, 651, 652, 3, 411, 205, 0, 652, 653, 3, 399, 199, - 0, 653, 654, 3, 433, 216, 0, 654, 96, 1, 0, 0, 0, 655, 656, 3, 399, 199, - 0, 656, 657, 3, 423, 211, 0, 657, 658, 3, 421, 210, 0, 658, 659, 3, 431, - 215, 0, 659, 660, 3, 433, 216, 0, 660, 661, 3, 429, 214, 0, 661, 662, 3, - 395, 197, 0, 662, 663, 3, 411, 205, 0, 663, 664, 3, 421, 210, 0, 664, 665, - 3, 433, 216, 0, 665, 98, 1, 0, 0, 0, 666, 667, 3, 399, 199, 0, 667, 668, - 3, 429, 214, 0, 668, 669, 3, 403, 201, 0, 669, 670, 3, 395, 197, 0, 670, - 671, 3, 433, 216, 0, 671, 672, 3, 403, 201, 0, 672, 100, 1, 0, 0, 0, 673, - 674, 3, 399, 199, 0, 674, 675, 3, 429, 214, 0, 675, 676, 3, 423, 211, 0, - 676, 677, 3, 431, 215, 0, 677, 678, 3, 431, 215, 0, 678, 102, 1, 0, 0, - 0, 679, 680, 3, 399, 199, 0, 680, 681, 3, 435, 217, 0, 681, 682, 3, 429, - 214, 0, 682, 683, 3, 429, 214, 0, 683, 684, 3, 403, 201, 0, 684, 685, 3, - 421, 210, 0, 685, 686, 3, 433, 216, 0, 686, 687, 5, 95, 0, 0, 687, 688, - 3, 401, 200, 0, 688, 689, 3, 395, 197, 0, 689, 690, 3, 433, 216, 0, 690, - 691, 3, 403, 201, 0, 691, 104, 1, 0, 0, 0, 692, 693, 3, 399, 199, 0, 693, - 694, 3, 435, 217, 0, 694, 695, 3, 429, 214, 0, 695, 696, 3, 429, 214, 0, - 696, 697, 3, 403, 201, 0, 697, 698, 3, 421, 210, 0, 698, 699, 3, 433, 216, - 0, 699, 700, 5, 95, 0, 0, 700, 701, 3, 433, 216, 0, 701, 702, 3, 411, 205, - 0, 702, 703, 3, 419, 209, 0, 703, 704, 3, 403, 201, 0, 704, 106, 1, 0, - 0, 0, 705, 706, 3, 399, 199, 0, 706, 707, 3, 435, 217, 0, 707, 708, 3, - 429, 214, 0, 708, 709, 3, 429, 214, 0, 709, 710, 3, 403, 201, 0, 710, 711, - 3, 421, 210, 0, 711, 712, 3, 433, 216, 0, 712, 713, 5, 95, 0, 0, 713, 714, - 3, 433, 216, 0, 714, 715, 3, 411, 205, 0, 715, 716, 3, 419, 209, 0, 716, - 717, 3, 403, 201, 0, 717, 718, 3, 431, 215, 0, 718, 719, 3, 433, 216, 0, - 719, 720, 3, 395, 197, 0, 720, 721, 3, 419, 209, 0, 721, 722, 3, 425, 212, - 0, 722, 108, 1, 0, 0, 0, 723, 724, 3, 401, 200, 0, 724, 725, 3, 395, 197, - 0, 725, 726, 3, 433, 216, 0, 726, 727, 3, 395, 197, 0, 727, 728, 3, 397, - 198, 0, 728, 729, 3, 395, 197, 0, 729, 730, 3, 431, 215, 0, 730, 731, 3, - 403, 201, 0, 731, 110, 1, 0, 0, 0, 732, 733, 3, 401, 200, 0, 733, 734, - 3, 403, 201, 0, 734, 735, 3, 405, 202, 0, 735, 736, 3, 395, 197, 0, 736, - 737, 3, 435, 217, 0, 737, 738, 3, 417, 208, 0, 738, 739, 3, 433, 216, 0, - 739, 112, 1, 0, 0, 0, 740, 741, 3, 401, 200, 0, 741, 742, 3, 403, 201, - 0, 742, 743, 3, 405, 202, 0, 743, 744, 3, 403, 201, 0, 744, 745, 3, 429, - 214, 0, 745, 746, 3, 429, 214, 0, 746, 747, 3, 395, 197, 0, 747, 748, 3, - 397, 198, 0, 748, 749, 3, 417, 208, 0, 749, 750, 3, 403, 201, 0, 750, 114, - 1, 0, 0, 0, 751, 752, 3, 401, 200, 0, 752, 753, 3, 403, 201, 0, 753, 754, - 3, 405, 202, 0, 754, 755, 3, 403, 201, 0, 755, 756, 3, 429, 214, 0, 756, - 757, 3, 429, 214, 0, 757, 758, 3, 403, 201, 0, 758, 759, 3, 401, 200, 0, - 759, 116, 1, 0, 0, 0, 760, 761, 3, 401, 200, 0, 761, 762, 3, 403, 201, - 0, 762, 763, 3, 417, 208, 0, 763, 764, 3, 403, 201, 0, 764, 765, 3, 433, - 216, 0, 765, 766, 3, 403, 201, 0, 766, 118, 1, 0, 0, 0, 767, 768, 3, 401, - 200, 0, 768, 769, 3, 403, 201, 0, 769, 770, 3, 431, 215, 0, 770, 771, 3, - 399, 199, 0, 771, 120, 1, 0, 0, 0, 772, 773, 3, 401, 200, 0, 773, 774, - 3, 403, 201, 0, 774, 775, 3, 433, 216, 0, 775, 776, 3, 395, 197, 0, 776, - 777, 3, 399, 199, 0, 777, 778, 3, 409, 204, 0, 778, 122, 1, 0, 0, 0, 779, - 780, 3, 401, 200, 0, 780, 781, 3, 411, 205, 0, 781, 782, 3, 431, 215, 0, - 782, 783, 3, 433, 216, 0, 783, 784, 3, 411, 205, 0, 784, 785, 3, 421, 210, - 0, 785, 786, 3, 399, 199, 0, 786, 787, 3, 433, 216, 0, 787, 124, 1, 0, - 0, 0, 788, 789, 3, 401, 200, 0, 789, 790, 3, 429, 214, 0, 790, 791, 3, - 423, 211, 0, 791, 792, 3, 425, 212, 0, 792, 126, 1, 0, 0, 0, 793, 794, - 3, 403, 201, 0, 794, 795, 3, 395, 197, 0, 795, 796, 3, 399, 199, 0, 796, - 797, 3, 409, 204, 0, 797, 128, 1, 0, 0, 0, 798, 799, 3, 403, 201, 0, 799, - 800, 3, 417, 208, 0, 800, 801, 3, 431, 215, 0, 801, 802, 3, 403, 201, 0, - 802, 130, 1, 0, 0, 0, 803, 804, 3, 403, 201, 0, 804, 805, 3, 421, 210, - 0, 805, 806, 3, 401, 200, 0, 806, 132, 1, 0, 0, 0, 807, 808, 3, 403, 201, - 0, 808, 809, 3, 431, 215, 0, 809, 810, 3, 399, 199, 0, 810, 811, 3, 395, - 197, 0, 811, 812, 3, 425, 212, 0, 812, 813, 3, 403, 201, 0, 813, 134, 1, - 0, 0, 0, 814, 815, 3, 403, 201, 0, 815, 816, 3, 441, 220, 0, 816, 817, - 3, 399, 199, 0, 817, 818, 3, 403, 201, 0, 818, 819, 3, 425, 212, 0, 819, - 820, 3, 433, 216, 0, 820, 136, 1, 0, 0, 0, 821, 822, 3, 403, 201, 0, 822, - 823, 3, 441, 220, 0, 823, 824, 3, 399, 199, 0, 824, 825, 3, 417, 208, 0, - 825, 826, 3, 435, 217, 0, 826, 827, 3, 431, 215, 0, 827, 828, 3, 411, 205, - 0, 828, 829, 3, 437, 218, 0, 829, 830, 3, 403, 201, 0, 830, 138, 1, 0, - 0, 0, 831, 832, 3, 403, 201, 0, 832, 833, 3, 441, 220, 0, 833, 834, 3, - 411, 205, 0, 834, 835, 3, 431, 215, 0, 835, 836, 3, 433, 216, 0, 836, 837, - 3, 431, 215, 0, 837, 140, 1, 0, 0, 0, 838, 839, 3, 403, 201, 0, 839, 840, - 3, 441, 220, 0, 840, 841, 3, 425, 212, 0, 841, 842, 3, 417, 208, 0, 842, - 843, 3, 395, 197, 0, 843, 844, 3, 411, 205, 0, 844, 845, 3, 421, 210, 0, - 845, 142, 1, 0, 0, 0, 846, 847, 3, 405, 202, 0, 847, 848, 3, 395, 197, - 0, 848, 849, 3, 411, 205, 0, 849, 850, 3, 417, 208, 0, 850, 144, 1, 0, - 0, 0, 851, 852, 3, 405, 202, 0, 852, 853, 3, 423, 211, 0, 853, 854, 3, - 429, 214, 0, 854, 146, 1, 0, 0, 0, 855, 856, 3, 405, 202, 0, 856, 857, - 3, 423, 211, 0, 857, 858, 3, 429, 214, 0, 858, 859, 3, 403, 201, 0, 859, - 860, 3, 411, 205, 0, 860, 861, 3, 407, 203, 0, 861, 862, 3, 421, 210, 0, - 862, 148, 1, 0, 0, 0, 863, 864, 3, 405, 202, 0, 864, 865, 3, 429, 214, - 0, 865, 866, 3, 423, 211, 0, 866, 867, 3, 419, 209, 0, 867, 150, 1, 0, - 0, 0, 868, 869, 3, 405, 202, 0, 869, 870, 3, 435, 217, 0, 870, 871, 3, - 417, 208, 0, 871, 872, 3, 417, 208, 0, 872, 152, 1, 0, 0, 0, 873, 874, - 3, 407, 203, 0, 874, 875, 3, 417, 208, 0, 875, 876, 3, 423, 211, 0, 876, - 877, 3, 397, 198, 0, 877, 154, 1, 0, 0, 0, 878, 879, 3, 407, 203, 0, 879, - 880, 3, 429, 214, 0, 880, 881, 3, 423, 211, 0, 881, 882, 3, 435, 217, 0, - 882, 883, 3, 425, 212, 0, 883, 156, 1, 0, 0, 0, 884, 885, 3, 409, 204, - 0, 885, 886, 3, 395, 197, 0, 886, 887, 3, 437, 218, 0, 887, 888, 3, 411, - 205, 0, 888, 889, 3, 421, 210, 0, 889, 890, 3, 407, 203, 0, 890, 158, 1, - 0, 0, 0, 891, 892, 3, 411, 205, 0, 892, 893, 3, 405, 202, 0, 893, 160, - 1, 0, 0, 0, 894, 895, 3, 411, 205, 0, 895, 896, 3, 407, 203, 0, 896, 897, - 3, 421, 210, 0, 897, 898, 3, 423, 211, 0, 898, 899, 3, 429, 214, 0, 899, - 900, 3, 403, 201, 0, 900, 162, 1, 0, 0, 0, 901, 902, 3, 411, 205, 0, 902, - 903, 3, 419, 209, 0, 903, 904, 3, 419, 209, 0, 904, 905, 3, 403, 201, 0, - 905, 906, 3, 401, 200, 0, 906, 907, 3, 411, 205, 0, 907, 908, 3, 395, 197, - 0, 908, 909, 3, 433, 216, 0, 909, 910, 3, 403, 201, 0, 910, 164, 1, 0, - 0, 0, 911, 912, 3, 411, 205, 0, 912, 913, 3, 421, 210, 0, 913, 166, 1, - 0, 0, 0, 914, 915, 3, 411, 205, 0, 915, 916, 3, 421, 210, 0, 916, 917, - 3, 401, 200, 0, 917, 918, 3, 403, 201, 0, 918, 919, 3, 441, 220, 0, 919, - 168, 1, 0, 0, 0, 920, 921, 3, 411, 205, 0, 921, 922, 3, 421, 210, 0, 922, - 923, 3, 401, 200, 0, 923, 924, 3, 403, 201, 0, 924, 925, 3, 441, 220, 0, - 925, 926, 3, 403, 201, 0, 926, 927, 3, 401, 200, 0, 927, 170, 1, 0, 0, - 0, 928, 929, 3, 411, 205, 0, 929, 930, 3, 421, 210, 0, 930, 931, 3, 411, - 205, 0, 931, 932, 3, 433, 216, 0, 932, 933, 3, 411, 205, 0, 933, 934, 3, - 395, 197, 0, 934, 935, 3, 417, 208, 0, 935, 936, 3, 417, 208, 0, 936, 937, - 3, 443, 221, 0, 937, 172, 1, 0, 0, 0, 938, 939, 3, 411, 205, 0, 939, 940, - 3, 421, 210, 0, 940, 941, 3, 421, 210, 0, 941, 942, 3, 403, 201, 0, 942, - 943, 3, 429, 214, 0, 943, 174, 1, 0, 0, 0, 944, 945, 3, 411, 205, 0, 945, - 946, 3, 421, 210, 0, 946, 947, 3, 431, 215, 0, 947, 948, 3, 403, 201, 0, - 948, 949, 3, 429, 214, 0, 949, 950, 3, 433, 216, 0, 950, 176, 1, 0, 0, - 0, 951, 952, 3, 411, 205, 0, 952, 953, 3, 421, 210, 0, 953, 954, 3, 431, - 215, 0, 954, 955, 3, 433, 216, 0, 955, 956, 3, 403, 201, 0, 956, 957, 3, - 395, 197, 0, 957, 958, 3, 401, 200, 0, 958, 178, 1, 0, 0, 0, 959, 960, - 3, 411, 205, 0, 960, 961, 3, 421, 210, 0, 961, 962, 3, 433, 216, 0, 962, - 963, 3, 403, 201, 0, 963, 964, 3, 429, 214, 0, 964, 965, 3, 431, 215, 0, - 965, 966, 3, 403, 201, 0, 966, 967, 3, 399, 199, 0, 967, 968, 3, 433, 216, - 0, 968, 180, 1, 0, 0, 0, 969, 970, 3, 411, 205, 0, 970, 971, 3, 421, 210, - 0, 971, 972, 3, 433, 216, 0, 972, 973, 3, 423, 211, 0, 973, 182, 1, 0, - 0, 0, 974, 975, 3, 411, 205, 0, 975, 976, 3, 431, 215, 0, 976, 184, 1, - 0, 0, 0, 977, 978, 3, 411, 205, 0, 978, 979, 3, 431, 215, 0, 979, 980, - 3, 421, 210, 0, 980, 981, 3, 435, 217, 0, 981, 982, 3, 417, 208, 0, 982, - 983, 3, 417, 208, 0, 983, 186, 1, 0, 0, 0, 984, 985, 3, 413, 206, 0, 985, - 986, 3, 423, 211, 0, 986, 987, 3, 411, 205, 0, 987, 988, 3, 421, 210, 0, - 988, 188, 1, 0, 0, 0, 989, 990, 3, 415, 207, 0, 990, 991, 3, 403, 201, - 0, 991, 992, 3, 443, 221, 0, 992, 190, 1, 0, 0, 0, 993, 994, 3, 417, 208, - 0, 994, 995, 3, 403, 201, 0, 995, 996, 3, 405, 202, 0, 996, 997, 3, 433, - 216, 0, 997, 192, 1, 0, 0, 0, 998, 999, 3, 417, 208, 0, 999, 1000, 3, 411, - 205, 0, 1000, 1001, 3, 415, 207, 0, 1001, 1002, 3, 403, 201, 0, 1002, 194, - 1, 0, 0, 0, 1003, 1004, 3, 417, 208, 0, 1004, 1005, 3, 411, 205, 0, 1005, - 1006, 3, 419, 209, 0, 1006, 1007, 3, 411, 205, 0, 1007, 1008, 3, 433, 216, - 0, 1008, 196, 1, 0, 0, 0, 1009, 1010, 3, 419, 209, 0, 1010, 1011, 3, 395, - 197, 0, 1011, 1012, 3, 433, 216, 0, 1012, 1013, 3, 399, 199, 0, 1013, 1014, - 3, 409, 204, 0, 1014, 198, 1, 0, 0, 0, 1015, 1016, 3, 421, 210, 0, 1016, - 1017, 3, 395, 197, 0, 1017, 1018, 3, 433, 216, 0, 1018, 1019, 3, 435, 217, - 0, 1019, 1020, 3, 429, 214, 0, 1020, 1021, 3, 395, 197, 0, 1021, 1022, - 3, 417, 208, 0, 1022, 200, 1, 0, 0, 0, 1023, 1024, 3, 421, 210, 0, 1024, - 1025, 3, 423, 211, 0, 1025, 202, 1, 0, 0, 0, 1026, 1027, 3, 421, 210, 0, - 1027, 1028, 3, 423, 211, 0, 1028, 1029, 3, 433, 216, 0, 1029, 204, 1, 0, - 0, 0, 1030, 1031, 3, 421, 210, 0, 1031, 1032, 3, 423, 211, 0, 1032, 1033, - 3, 433, 216, 0, 1033, 1034, 3, 421, 210, 0, 1034, 1035, 3, 435, 217, 0, - 1035, 1036, 3, 417, 208, 0, 1036, 1037, 3, 417, 208, 0, 1037, 206, 1, 0, - 0, 0, 1038, 1039, 3, 421, 210, 0, 1039, 1040, 3, 435, 217, 0, 1040, 1041, - 3, 417, 208, 0, 1041, 1042, 3, 417, 208, 0, 1042, 208, 1, 0, 0, 0, 1043, - 1044, 3, 423, 211, 0, 1044, 1045, 3, 405, 202, 0, 1045, 210, 1, 0, 0, 0, - 1046, 1047, 3, 423, 211, 0, 1047, 1048, 3, 405, 202, 0, 1048, 1049, 3, - 405, 202, 0, 1049, 1050, 3, 431, 215, 0, 1050, 1051, 3, 403, 201, 0, 1051, - 1052, 3, 433, 216, 0, 1052, 212, 1, 0, 0, 0, 1053, 1054, 3, 423, 211, 0, - 1054, 1055, 3, 421, 210, 0, 1055, 214, 1, 0, 0, 0, 1056, 1057, 3, 423, - 211, 0, 1057, 1058, 3, 429, 214, 0, 1058, 216, 1, 0, 0, 0, 1059, 1060, - 3, 423, 211, 0, 1060, 1061, 3, 429, 214, 0, 1061, 1062, 3, 401, 200, 0, - 1062, 1063, 3, 403, 201, 0, 1063, 1064, 3, 429, 214, 0, 1064, 218, 1, 0, - 0, 0, 1065, 1066, 3, 423, 211, 0, 1066, 1067, 3, 435, 217, 0, 1067, 1068, - 3, 433, 216, 0, 1068, 1069, 3, 403, 201, 0, 1069, 1070, 3, 429, 214, 0, - 1070, 220, 1, 0, 0, 0, 1071, 1072, 3, 425, 212, 0, 1072, 1073, 3, 417, - 208, 0, 1073, 1074, 3, 395, 197, 0, 1074, 1075, 3, 421, 210, 0, 1075, 222, - 1, 0, 0, 0, 1076, 1077, 3, 425, 212, 0, 1077, 1078, 3, 429, 214, 0, 1078, - 1079, 3, 395, 197, 0, 1079, 1080, 3, 407, 203, 0, 1080, 1081, 3, 419, 209, - 0, 1081, 1082, 3, 395, 197, 0, 1082, 224, 1, 0, 0, 0, 1083, 1084, 3, 425, - 212, 0, 1084, 1085, 3, 429, 214, 0, 1085, 1086, 3, 411, 205, 0, 1086, 1087, - 3, 419, 209, 0, 1087, 1088, 3, 395, 197, 0, 1088, 1089, 3, 429, 214, 0, - 1089, 1090, 3, 443, 221, 0, 1090, 226, 1, 0, 0, 0, 1091, 1092, 3, 427, - 213, 0, 1092, 1093, 3, 435, 217, 0, 1093, 1094, 3, 403, 201, 0, 1094, 1095, - 3, 429, 214, 0, 1095, 1096, 3, 443, 221, 0, 1096, 228, 1, 0, 0, 0, 1097, - 1098, 3, 429, 214, 0, 1098, 1099, 3, 395, 197, 0, 1099, 1100, 3, 411, 205, - 0, 1100, 1101, 3, 431, 215, 0, 1101, 1102, 3, 403, 201, 0, 1102, 230, 1, - 0, 0, 0, 1103, 1104, 3, 429, 214, 0, 1104, 1105, 3, 403, 201, 0, 1105, - 1106, 3, 399, 199, 0, 1106, 1107, 3, 435, 217, 0, 1107, 1108, 3, 429, 214, - 0, 1108, 1109, 3, 431, 215, 0, 1109, 1110, 3, 411, 205, 0, 1110, 1111, - 3, 437, 218, 0, 1111, 1112, 3, 403, 201, 0, 1112, 232, 1, 0, 0, 0, 1113, - 1114, 3, 429, 214, 0, 1114, 1115, 3, 403, 201, 0, 1115, 1116, 3, 405, 202, - 0, 1116, 1117, 3, 403, 201, 0, 1117, 1118, 3, 429, 214, 0, 1118, 1119, - 3, 403, 201, 0, 1119, 1120, 3, 421, 210, 0, 1120, 1121, 3, 399, 199, 0, - 1121, 1122, 3, 403, 201, 0, 1122, 1123, 3, 431, 215, 0, 1123, 234, 1, 0, - 0, 0, 1124, 1125, 3, 429, 214, 0, 1125, 1126, 3, 403, 201, 0, 1126, 1127, - 3, 407, 203, 0, 1127, 1128, 3, 403, 201, 0, 1128, 1129, 3, 441, 220, 0, - 1129, 1130, 3, 425, 212, 0, 1130, 236, 1, 0, 0, 0, 1131, 1132, 3, 429, - 214, 0, 1132, 1133, 3, 403, 201, 0, 1133, 1134, 3, 411, 205, 0, 1134, 1135, - 3, 421, 210, 0, 1135, 1136, 3, 401, 200, 0, 1136, 1137, 3, 403, 201, 0, - 1137, 1138, 3, 441, 220, 0, 1138, 238, 1, 0, 0, 0, 1139, 1140, 3, 429, - 214, 0, 1140, 1141, 3, 403, 201, 0, 1141, 1142, 3, 417, 208, 0, 1142, 1143, - 3, 403, 201, 0, 1143, 1144, 3, 395, 197, 0, 1144, 1145, 3, 431, 215, 0, - 1145, 1146, 3, 403, 201, 0, 1146, 240, 1, 0, 0, 0, 1147, 1148, 3, 429, - 214, 0, 1148, 1149, 3, 403, 201, 0, 1149, 1150, 3, 421, 210, 0, 1150, 1151, - 3, 395, 197, 0, 1151, 1152, 3, 419, 209, 0, 1152, 1153, 3, 403, 201, 0, - 1153, 242, 1, 0, 0, 0, 1154, 1155, 3, 429, 214, 0, 1155, 1156, 3, 403, - 201, 0, 1156, 1157, 3, 425, 212, 0, 1157, 1158, 3, 417, 208, 0, 1158, 1159, - 3, 395, 197, 0, 1159, 1160, 3, 399, 199, 0, 1160, 1161, 3, 403, 201, 0, - 1161, 244, 1, 0, 0, 0, 1162, 1163, 3, 429, 214, 0, 1163, 1164, 3, 403, - 201, 0, 1164, 1165, 3, 431, 215, 0, 1165, 1166, 3, 433, 216, 0, 1166, 1167, - 3, 429, 214, 0, 1167, 1168, 3, 411, 205, 0, 1168, 1169, 3, 399, 199, 0, - 1169, 1170, 3, 433, 216, 0, 1170, 246, 1, 0, 0, 0, 1171, 1172, 3, 429, - 214, 0, 1172, 1173, 3, 403, 201, 0, 1173, 1174, 3, 433, 216, 0, 1174, 1175, - 3, 435, 217, 0, 1175, 1176, 3, 429, 214, 0, 1176, 1177, 3, 421, 210, 0, - 1177, 1178, 3, 411, 205, 0, 1178, 1179, 3, 421, 210, 0, 1179, 1180, 3, - 407, 203, 0, 1180, 248, 1, 0, 0, 0, 1181, 1182, 3, 429, 214, 0, 1182, 1183, - 3, 411, 205, 0, 1183, 1184, 3, 407, 203, 0, 1184, 1185, 3, 409, 204, 0, - 1185, 1186, 3, 433, 216, 0, 1186, 250, 1, 0, 0, 0, 1187, 1188, 3, 429, - 214, 0, 1188, 1189, 3, 423, 211, 0, 1189, 1190, 3, 417, 208, 0, 1190, 1191, - 3, 417, 208, 0, 1191, 1192, 3, 397, 198, 0, 1192, 1193, 3, 395, 197, 0, - 1193, 1194, 3, 399, 199, 0, 1194, 1195, 3, 415, 207, 0, 1195, 252, 1, 0, - 0, 0, 1196, 1197, 3, 429, 214, 0, 1197, 1198, 3, 423, 211, 0, 1198, 1199, - 3, 439, 219, 0, 1199, 254, 1, 0, 0, 0, 1200, 1201, 3, 429, 214, 0, 1201, - 1202, 3, 423, 211, 0, 1202, 1203, 3, 439, 219, 0, 1203, 1204, 3, 431, 215, - 0, 1204, 256, 1, 0, 0, 0, 1205, 1206, 3, 431, 215, 0, 1206, 1207, 3, 395, - 197, 0, 1207, 1208, 3, 437, 218, 0, 1208, 1209, 3, 403, 201, 0, 1209, 1210, - 3, 425, 212, 0, 1210, 1211, 3, 423, 211, 0, 1211, 1212, 3, 411, 205, 0, - 1212, 1213, 3, 421, 210, 0, 1213, 1214, 3, 433, 216, 0, 1214, 258, 1, 0, - 0, 0, 1215, 1216, 3, 431, 215, 0, 1216, 1217, 3, 403, 201, 0, 1217, 1218, - 3, 417, 208, 0, 1218, 1219, 3, 403, 201, 0, 1219, 1220, 3, 399, 199, 0, - 1220, 1221, 3, 433, 216, 0, 1221, 260, 1, 0, 0, 0, 1222, 1223, 3, 431, - 215, 0, 1223, 1224, 3, 403, 201, 0, 1224, 1225, 3, 433, 216, 0, 1225, 262, - 1, 0, 0, 0, 1226, 1227, 3, 431, 215, 0, 1227, 1228, 3, 433, 216, 0, 1228, - 1229, 3, 429, 214, 0, 1229, 1230, 3, 411, 205, 0, 1230, 1231, 3, 399, 199, - 0, 1231, 1232, 3, 433, 216, 0, 1232, 264, 1, 0, 0, 0, 1233, 1234, 3, 433, - 216, 0, 1234, 1235, 3, 395, 197, 0, 1235, 1236, 3, 397, 198, 0, 1236, 1237, - 3, 417, 208, 0, 1237, 1238, 3, 403, 201, 0, 1238, 266, 1, 0, 0, 0, 1239, - 1240, 3, 433, 216, 0, 1240, 1241, 3, 403, 201, 0, 1241, 1242, 3, 419, 209, - 0, 1242, 1243, 3, 425, 212, 0, 1243, 268, 1, 0, 0, 0, 1244, 1245, 3, 433, - 216, 0, 1245, 1246, 3, 403, 201, 0, 1246, 1247, 3, 419, 209, 0, 1247, 1248, - 3, 425, 212, 0, 1248, 1249, 3, 423, 211, 0, 1249, 1250, 3, 429, 214, 0, - 1250, 1251, 3, 395, 197, 0, 1251, 1252, 3, 429, 214, 0, 1252, 1253, 3, - 443, 221, 0, 1253, 270, 1, 0, 0, 0, 1254, 1255, 3, 433, 216, 0, 1255, 1256, - 3, 409, 204, 0, 1256, 1257, 3, 403, 201, 0, 1257, 1258, 3, 421, 210, 0, - 1258, 272, 1, 0, 0, 0, 1259, 1260, 3, 433, 216, 0, 1260, 1261, 3, 423, - 211, 0, 1261, 274, 1, 0, 0, 0, 1262, 1263, 3, 433, 216, 0, 1263, 1264, - 3, 429, 214, 0, 1264, 1265, 3, 395, 197, 0, 1265, 1266, 3, 421, 210, 0, - 1266, 1267, 3, 431, 215, 0, 1267, 1268, 3, 395, 197, 0, 1268, 1269, 3, - 399, 199, 0, 1269, 1270, 3, 433, 216, 0, 1270, 1271, 3, 411, 205, 0, 1271, - 1272, 3, 423, 211, 0, 1272, 1273, 3, 421, 210, 0, 1273, 276, 1, 0, 0, 0, - 1274, 1275, 3, 433, 216, 0, 1275, 1276, 3, 429, 214, 0, 1276, 1277, 3, - 411, 205, 0, 1277, 1278, 3, 407, 203, 0, 1278, 1279, 3, 407, 203, 0, 1279, - 1280, 3, 403, 201, 0, 1280, 1281, 3, 429, 214, 0, 1281, 278, 1, 0, 0, 0, - 1282, 1283, 3, 435, 217, 0, 1283, 1284, 3, 421, 210, 0, 1284, 1285, 3, - 411, 205, 0, 1285, 1286, 3, 423, 211, 0, 1286, 1287, 3, 421, 210, 0, 1287, - 280, 1, 0, 0, 0, 1288, 1289, 3, 435, 217, 0, 1289, 1290, 3, 421, 210, 0, - 1290, 1291, 3, 411, 205, 0, 1291, 1292, 3, 427, 213, 0, 1292, 1293, 3, - 435, 217, 0, 1293, 1294, 3, 403, 201, 0, 1294, 282, 1, 0, 0, 0, 1295, 1296, - 3, 435, 217, 0, 1296, 1297, 3, 425, 212, 0, 1297, 1298, 3, 401, 200, 0, - 1298, 1299, 3, 395, 197, 0, 1299, 1300, 3, 433, 216, 0, 1300, 1301, 3, - 403, 201, 0, 1301, 284, 1, 0, 0, 0, 1302, 1303, 3, 435, 217, 0, 1303, 1304, - 3, 431, 215, 0, 1304, 1305, 3, 411, 205, 0, 1305, 1306, 3, 421, 210, 0, - 1306, 1307, 3, 407, 203, 0, 1307, 286, 1, 0, 0, 0, 1308, 1309, 3, 437, - 218, 0, 1309, 1310, 3, 395, 197, 0, 1310, 1311, 3, 399, 199, 0, 1311, 1312, - 3, 435, 217, 0, 1312, 1313, 3, 435, 217, 0, 1313, 1314, 3, 419, 209, 0, - 1314, 288, 1, 0, 0, 0, 1315, 1316, 3, 437, 218, 0, 1316, 1317, 3, 395, - 197, 0, 1317, 1318, 3, 417, 208, 0, 1318, 1319, 3, 435, 217, 0, 1319, 1320, - 3, 403, 201, 0, 1320, 1321, 3, 431, 215, 0, 1321, 290, 1, 0, 0, 0, 1322, - 1323, 3, 437, 218, 0, 1323, 1324, 3, 411, 205, 0, 1324, 1325, 3, 403, 201, - 0, 1325, 1326, 3, 439, 219, 0, 1326, 292, 1, 0, 0, 0, 1327, 1328, 3, 437, - 218, 0, 1328, 1329, 3, 411, 205, 0, 1329, 1330, 3, 429, 214, 0, 1330, 1331, - 3, 433, 216, 0, 1331, 1332, 3, 435, 217, 0, 1332, 1333, 3, 395, 197, 0, - 1333, 1334, 3, 417, 208, 0, 1334, 294, 1, 0, 0, 0, 1335, 1336, 3, 439, - 219, 0, 1336, 1337, 3, 409, 204, 0, 1337, 1338, 3, 403, 201, 0, 1338, 1339, - 3, 421, 210, 0, 1339, 296, 1, 0, 0, 0, 1340, 1341, 3, 439, 219, 0, 1341, - 1342, 3, 409, 204, 0, 1342, 1343, 3, 403, 201, 0, 1343, 1344, 3, 429, 214, - 0, 1344, 1345, 3, 403, 201, 0, 1345, 298, 1, 0, 0, 0, 1346, 1347, 3, 439, - 219, 0, 1347, 1348, 3, 411, 205, 0, 1348, 1349, 3, 433, 216, 0, 1349, 1350, - 3, 409, 204, 0, 1350, 300, 1, 0, 0, 0, 1351, 1352, 3, 439, 219, 0, 1352, - 1353, 3, 411, 205, 0, 1353, 1354, 3, 433, 216, 0, 1354, 1355, 3, 409, 204, - 0, 1355, 1356, 3, 423, 211, 0, 1356, 1357, 3, 435, 217, 0, 1357, 1358, - 3, 433, 216, 0, 1358, 302, 1, 0, 0, 0, 1359, 1360, 3, 405, 202, 0, 1360, - 1361, 3, 411, 205, 0, 1361, 1362, 3, 429, 214, 0, 1362, 1363, 3, 431, 215, - 0, 1363, 1364, 3, 433, 216, 0, 1364, 1365, 5, 95, 0, 0, 1365, 1366, 3, - 437, 218, 0, 1366, 1367, 3, 395, 197, 0, 1367, 1368, 3, 417, 208, 0, 1368, - 1369, 3, 435, 217, 0, 1369, 1370, 3, 403, 201, 0, 1370, 304, 1, 0, 0, 0, - 1371, 1372, 3, 423, 211, 0, 1372, 1373, 3, 437, 218, 0, 1373, 1374, 3, - 403, 201, 0, 1374, 1375, 3, 429, 214, 0, 1375, 306, 1, 0, 0, 0, 1376, 1377, - 3, 425, 212, 0, 1377, 1378, 3, 395, 197, 0, 1378, 1379, 3, 429, 214, 0, - 1379, 1380, 3, 433, 216, 0, 1380, 1381, 3, 411, 205, 0, 1381, 1382, 3, - 433, 216, 0, 1382, 1383, 3, 411, 205, 0, 1383, 1384, 3, 423, 211, 0, 1384, - 1385, 3, 421, 210, 0, 1385, 308, 1, 0, 0, 0, 1386, 1387, 3, 429, 214, 0, - 1387, 1388, 3, 395, 197, 0, 1388, 1389, 3, 421, 210, 0, 1389, 1390, 3, - 407, 203, 0, 1390, 1391, 3, 403, 201, 0, 1391, 310, 1, 0, 0, 0, 1392, 1393, - 3, 425, 212, 0, 1393, 1394, 3, 429, 214, 0, 1394, 1395, 3, 403, 201, 0, - 1395, 1396, 3, 399, 199, 0, 1396, 1397, 3, 403, 201, 0, 1397, 1398, 3, - 401, 200, 0, 1398, 1399, 3, 411, 205, 0, 1399, 1400, 3, 421, 210, 0, 1400, - 1401, 3, 407, 203, 0, 1401, 312, 1, 0, 0, 0, 1402, 1403, 3, 435, 217, 0, - 1403, 1404, 3, 421, 210, 0, 1404, 1405, 3, 397, 198, 0, 1405, 1406, 3, - 423, 211, 0, 1406, 1407, 3, 435, 217, 0, 1407, 1408, 3, 421, 210, 0, 1408, - 1409, 3, 401, 200, 0, 1409, 1410, 3, 403, 201, 0, 1410, 1411, 3, 401, 200, - 0, 1411, 314, 1, 0, 0, 0, 1412, 1413, 3, 399, 199, 0, 1413, 1414, 3, 435, - 217, 0, 1414, 1415, 3, 429, 214, 0, 1415, 1416, 3, 429, 214, 0, 1416, 1417, - 3, 403, 201, 0, 1417, 1418, 3, 421, 210, 0, 1418, 1419, 3, 433, 216, 0, - 1419, 316, 1, 0, 0, 0, 1420, 1421, 3, 405, 202, 0, 1421, 1422, 3, 423, - 211, 0, 1422, 1423, 3, 417, 208, 0, 1423, 1424, 3, 417, 208, 0, 1424, 1425, - 3, 423, 211, 0, 1425, 1426, 3, 439, 219, 0, 1426, 1427, 3, 411, 205, 0, - 1427, 1428, 3, 421, 210, 0, 1428, 1429, 3, 407, 203, 0, 1429, 318, 1, 0, - 0, 0, 1430, 1431, 3, 399, 199, 0, 1431, 1432, 3, 435, 217, 0, 1432, 1433, - 3, 419, 209, 0, 1433, 1434, 3, 403, 201, 0, 1434, 1435, 5, 95, 0, 0, 1435, - 1436, 3, 401, 200, 0, 1436, 1437, 3, 411, 205, 0, 1437, 1438, 3, 431, 215, - 0, 1438, 1439, 3, 433, 216, 0, 1439, 320, 1, 0, 0, 0, 1440, 1441, 3, 401, - 200, 0, 1441, 1442, 3, 403, 201, 0, 1442, 1443, 3, 421, 210, 0, 1443, 1444, - 3, 431, 215, 0, 1444, 1445, 3, 403, 201, 0, 1445, 1446, 5, 95, 0, 0, 1446, - 1447, 3, 429, 214, 0, 1447, 1448, 3, 395, 197, 0, 1448, 1449, 3, 421, 210, - 0, 1449, 1450, 3, 415, 207, 0, 1450, 322, 1, 0, 0, 0, 1451, 1452, 3, 417, - 208, 0, 1452, 1453, 3, 395, 197, 0, 1453, 1454, 3, 407, 203, 0, 1454, 324, - 1, 0, 0, 0, 1455, 1456, 3, 417, 208, 0, 1456, 1457, 3, 395, 197, 0, 1457, - 1458, 3, 431, 215, 0, 1458, 1459, 3, 433, 216, 0, 1459, 1460, 5, 95, 0, - 0, 1460, 1461, 3, 437, 218, 0, 1461, 1462, 3, 395, 197, 0, 1462, 1463, - 3, 417, 208, 0, 1463, 1464, 3, 435, 217, 0, 1464, 1465, 3, 403, 201, 0, - 1465, 326, 1, 0, 0, 0, 1466, 1467, 3, 417, 208, 0, 1467, 1468, 3, 403, - 201, 0, 1468, 1469, 3, 395, 197, 0, 1469, 1470, 3, 401, 200, 0, 1470, 328, - 1, 0, 0, 0, 1471, 1472, 3, 421, 210, 0, 1472, 1473, 3, 433, 216, 0, 1473, - 1474, 3, 409, 204, 0, 1474, 1475, 5, 95, 0, 0, 1475, 1476, 3, 437, 218, - 0, 1476, 1477, 3, 395, 197, 0, 1477, 1478, 3, 417, 208, 0, 1478, 1479, - 3, 435, 217, 0, 1479, 1480, 3, 403, 201, 0, 1480, 330, 1, 0, 0, 0, 1481, - 1482, 3, 421, 210, 0, 1482, 1483, 3, 433, 216, 0, 1483, 1484, 3, 411, 205, - 0, 1484, 1485, 3, 417, 208, 0, 1485, 1486, 3, 403, 201, 0, 1486, 332, 1, - 0, 0, 0, 1487, 1488, 3, 425, 212, 0, 1488, 1489, 3, 403, 201, 0, 1489, - 1490, 3, 429, 214, 0, 1490, 1491, 3, 399, 199, 0, 1491, 1492, 3, 403, 201, - 0, 1492, 1493, 3, 421, 210, 0, 1493, 1494, 3, 433, 216, 0, 1494, 1495, - 5, 95, 0, 0, 1495, 1496, 3, 429, 214, 0, 1496, 1497, 3, 395, 197, 0, 1497, - 1498, 3, 421, 210, 0, 1498, 1499, 3, 415, 207, 0, 1499, 334, 1, 0, 0, 0, - 1500, 1501, 3, 429, 214, 0, 1501, 1502, 3, 395, 197, 0, 1502, 1503, 3, - 421, 210, 0, 1503, 1504, 3, 415, 207, 0, 1504, 336, 1, 0, 0, 0, 1505, 1506, - 3, 429, 214, 0, 1506, 1507, 3, 423, 211, 0, 1507, 1508, 3, 439, 219, 0, - 1508, 1509, 5, 95, 0, 0, 1509, 1510, 3, 421, 210, 0, 1510, 1511, 3, 435, - 217, 0, 1511, 1512, 3, 419, 209, 0, 1512, 1513, 3, 397, 198, 0, 1513, 1514, - 3, 403, 201, 0, 1514, 1515, 3, 429, 214, 0, 1515, 338, 1, 0, 0, 0, 1516, - 1517, 3, 407, 203, 0, 1517, 1518, 3, 403, 201, 0, 1518, 1519, 3, 421, 210, - 0, 1519, 1520, 3, 403, 201, 0, 1520, 1521, 3, 429, 214, 0, 1521, 1522, - 3, 395, 197, 0, 1522, 1523, 3, 433, 216, 0, 1523, 1524, 3, 403, 201, 0, - 1524, 1525, 3, 401, 200, 0, 1525, 340, 1, 0, 0, 0, 1526, 1527, 3, 395, - 197, 0, 1527, 1528, 3, 417, 208, 0, 1528, 1529, 3, 439, 219, 0, 1529, 1530, - 3, 395, 197, 0, 1530, 1531, 3, 443, 221, 0, 1531, 1532, 3, 431, 215, 0, - 1532, 342, 1, 0, 0, 0, 1533, 1534, 3, 431, 215, 0, 1534, 1535, 3, 433, - 216, 0, 1535, 1536, 3, 423, 211, 0, 1536, 1537, 3, 429, 214, 0, 1537, 1538, - 3, 403, 201, 0, 1538, 1539, 3, 401, 200, 0, 1539, 344, 1, 0, 0, 0, 1540, - 1541, 3, 433, 216, 0, 1541, 1542, 3, 429, 214, 0, 1542, 1543, 3, 435, 217, - 0, 1543, 1544, 3, 403, 201, 0, 1544, 346, 1, 0, 0, 0, 1545, 1546, 3, 405, - 202, 0, 1546, 1547, 3, 395, 197, 0, 1547, 1548, 3, 417, 208, 0, 1548, 1549, - 3, 431, 215, 0, 1549, 1550, 3, 403, 201, 0, 1550, 348, 1, 0, 0, 0, 1551, - 1552, 3, 439, 219, 0, 1552, 1553, 3, 411, 205, 0, 1553, 1554, 3, 421, 210, - 0, 1554, 1555, 3, 401, 200, 0, 1555, 1556, 3, 423, 211, 0, 1556, 1557, - 3, 439, 219, 0, 1557, 350, 1, 0, 0, 0, 1558, 1559, 3, 421, 210, 0, 1559, - 1560, 3, 435, 217, 0, 1560, 1561, 3, 417, 208, 0, 1561, 1562, 3, 417, 208, - 0, 1562, 1563, 3, 431, 215, 0, 1563, 352, 1, 0, 0, 0, 1564, 1565, 3, 405, - 202, 0, 1565, 1566, 3, 411, 205, 0, 1566, 1567, 3, 429, 214, 0, 1567, 1568, - 3, 431, 215, 0, 1568, 1569, 3, 433, 216, 0, 1569, 354, 1, 0, 0, 0, 1570, - 1571, 3, 417, 208, 0, 1571, 1572, 3, 395, 197, 0, 1572, 1573, 3, 431, 215, - 0, 1573, 1574, 3, 433, 216, 0, 1574, 356, 1, 0, 0, 0, 1575, 1576, 3, 405, - 202, 0, 1576, 1577, 3, 411, 205, 0, 1577, 1578, 3, 417, 208, 0, 1578, 1579, - 3, 433, 216, 0, 1579, 1580, 3, 403, 201, 0, 1580, 1581, 3, 429, 214, 0, - 1581, 358, 1, 0, 0, 0, 1582, 1583, 3, 407, 203, 0, 1583, 1584, 3, 429, - 214, 0, 1584, 1585, 3, 423, 211, 0, 1585, 1586, 3, 435, 217, 0, 1586, 1587, - 3, 425, 212, 0, 1587, 1588, 3, 431, 215, 0, 1588, 360, 1, 0, 0, 0, 1589, - 1590, 3, 403, 201, 0, 1590, 1591, 3, 441, 220, 0, 1591, 1592, 3, 399, 199, - 0, 1592, 1593, 3, 417, 208, 0, 1593, 1594, 3, 435, 217, 0, 1594, 1595, - 3, 401, 200, 0, 1595, 1596, 3, 403, 201, 0, 1596, 362, 1, 0, 0, 0, 1597, - 1598, 3, 433, 216, 0, 1598, 1599, 3, 411, 205, 0, 1599, 1600, 3, 403, 201, - 0, 1600, 1601, 3, 431, 215, 0, 1601, 364, 1, 0, 0, 0, 1602, 1603, 3, 423, - 211, 0, 1603, 1604, 3, 433, 216, 0, 1604, 1605, 3, 409, 204, 0, 1605, 1606, - 3, 403, 201, 0, 1606, 1607, 3, 429, 214, 0, 1607, 1608, 3, 431, 215, 0, - 1608, 366, 1, 0, 0, 0, 1609, 1610, 3, 401, 200, 0, 1610, 1611, 3, 423, - 211, 0, 1611, 368, 1, 0, 0, 0, 1612, 1613, 3, 421, 210, 0, 1613, 1614, - 3, 423, 211, 0, 1614, 1615, 3, 433, 216, 0, 1615, 1616, 3, 409, 204, 0, - 1616, 1617, 3, 411, 205, 0, 1617, 1618, 3, 421, 210, 0, 1618, 1619, 3, - 407, 203, 0, 1619, 370, 1, 0, 0, 0, 1620, 1626, 5, 34, 0, 0, 1621, 1625, - 8, 0, 0, 0, 1622, 1623, 5, 34, 0, 0, 1623, 1625, 5, 34, 0, 0, 1624, 1621, - 1, 0, 0, 0, 1624, 1622, 1, 0, 0, 0, 1625, 1628, 1, 0, 0, 0, 1626, 1624, - 1, 0, 0, 0, 1626, 1627, 1, 0, 0, 0, 1627, 1629, 1, 0, 0, 0, 1628, 1626, - 1, 0, 0, 0, 1629, 1656, 5, 34, 0, 0, 1630, 1636, 5, 96, 0, 0, 1631, 1635, - 8, 1, 0, 0, 1632, 1633, 5, 96, 0, 0, 1633, 1635, 5, 96, 0, 0, 1634, 1631, - 1, 0, 0, 0, 1634, 1632, 1, 0, 0, 0, 1635, 1638, 1, 0, 0, 0, 1636, 1634, - 1, 0, 0, 0, 1636, 1637, 1, 0, 0, 0, 1637, 1639, 1, 0, 0, 0, 1638, 1636, - 1, 0, 0, 0, 1639, 1656, 5, 96, 0, 0, 1640, 1644, 5, 91, 0, 0, 1641, 1643, - 8, 2, 0, 0, 1642, 1641, 1, 0, 0, 0, 1643, 1646, 1, 0, 0, 0, 1644, 1642, - 1, 0, 0, 0, 1644, 1645, 1, 0, 0, 0, 1645, 1647, 1, 0, 0, 0, 1646, 1644, - 1, 0, 0, 0, 1647, 1656, 5, 93, 0, 0, 1648, 1652, 7, 3, 0, 0, 1649, 1651, - 7, 4, 0, 0, 1650, 1649, 1, 0, 0, 0, 1651, 1654, 1, 0, 0, 0, 1652, 1650, - 1, 0, 0, 0, 1652, 1653, 1, 0, 0, 0, 1653, 1656, 1, 0, 0, 0, 1654, 1652, - 1, 0, 0, 0, 1655, 1620, 1, 0, 0, 0, 1655, 1630, 1, 0, 0, 0, 1655, 1640, - 1, 0, 0, 0, 1655, 1648, 1, 0, 0, 0, 1656, 372, 1, 0, 0, 0, 1657, 1659, - 3, 393, 196, 0, 1658, 1657, 1, 0, 0, 0, 1659, 1660, 1, 0, 0, 0, 1660, 1658, - 1, 0, 0, 0, 1660, 1661, 1, 0, 0, 0, 1661, 1669, 1, 0, 0, 0, 1662, 1666, - 5, 46, 0, 0, 1663, 1665, 3, 393, 196, 0, 1664, 1663, 1, 0, 0, 0, 1665, - 1668, 1, 0, 0, 0, 1666, 1664, 1, 0, 0, 0, 1666, 1667, 1, 0, 0, 0, 1667, - 1670, 1, 0, 0, 0, 1668, 1666, 1, 0, 0, 0, 1669, 1662, 1, 0, 0, 0, 1669, - 1670, 1, 0, 0, 0, 1670, 1678, 1, 0, 0, 0, 1671, 1673, 5, 46, 0, 0, 1672, - 1674, 3, 393, 196, 0, 1673, 1672, 1, 0, 0, 0, 1674, 1675, 1, 0, 0, 0, 1675, - 1673, 1, 0, 0, 0, 1675, 1676, 1, 0, 0, 0, 1676, 1678, 1, 0, 0, 0, 1677, - 1658, 1, 0, 0, 0, 1677, 1671, 1, 0, 0, 0, 1678, 1688, 1, 0, 0, 0, 1679, - 1681, 3, 403, 201, 0, 1680, 1682, 7, 5, 0, 0, 1681, 1680, 1, 0, 0, 0, 1681, - 1682, 1, 0, 0, 0, 1682, 1684, 1, 0, 0, 0, 1683, 1685, 3, 393, 196, 0, 1684, - 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, - 1687, 1, 0, 0, 0, 1687, 1689, 1, 0, 0, 0, 1688, 1679, 1, 0, 0, 0, 1688, - 1689, 1, 0, 0, 0, 1689, 1699, 1, 0, 0, 0, 1690, 1691, 5, 48, 0, 0, 1691, - 1692, 5, 120, 0, 0, 1692, 1694, 1, 0, 0, 0, 1693, 1695, 3, 391, 195, 0, - 1694, 1693, 1, 0, 0, 0, 1695, 1696, 1, 0, 0, 0, 1696, 1694, 1, 0, 0, 0, - 1696, 1697, 1, 0, 0, 0, 1697, 1699, 1, 0, 0, 0, 1698, 1677, 1, 0, 0, 0, - 1698, 1690, 1, 0, 0, 0, 1699, 374, 1, 0, 0, 0, 1700, 1704, 5, 63, 0, 0, - 1701, 1703, 3, 393, 196, 0, 1702, 1701, 1, 0, 0, 0, 1703, 1706, 1, 0, 0, - 0, 1704, 1702, 1, 0, 0, 0, 1704, 1705, 1, 0, 0, 0, 1705, 376, 1, 0, 0, - 0, 1706, 1704, 1, 0, 0, 0, 1707, 1708, 7, 6, 0, 0, 1708, 1709, 3, 371, - 185, 0, 1709, 378, 1, 0, 0, 0, 1710, 1716, 5, 39, 0, 0, 1711, 1715, 8, - 7, 0, 0, 1712, 1713, 5, 39, 0, 0, 1713, 1715, 5, 39, 0, 0, 1714, 1711, - 1, 0, 0, 0, 1714, 1712, 1, 0, 0, 0, 1715, 1718, 1, 0, 0, 0, 1716, 1714, - 1, 0, 0, 0, 1716, 1717, 1, 0, 0, 0, 1717, 1719, 1, 0, 0, 0, 1718, 1716, - 1, 0, 0, 0, 1719, 1720, 5, 39, 0, 0, 1720, 380, 1, 0, 0, 0, 1721, 1722, - 3, 441, 220, 0, 1722, 1723, 3, 379, 189, 0, 1723, 382, 1, 0, 0, 0, 1724, - 1725, 5, 45, 0, 0, 1725, 1726, 5, 45, 0, 0, 1726, 1730, 1, 0, 0, 0, 1727, - 1729, 8, 8, 0, 0, 1728, 1727, 1, 0, 0, 0, 1729, 1732, 1, 0, 0, 0, 1730, - 1728, 1, 0, 0, 0, 1730, 1731, 1, 0, 0, 0, 1731, 1738, 1, 0, 0, 0, 1732, - 1730, 1, 0, 0, 0, 1733, 1735, 5, 13, 0, 0, 1734, 1733, 1, 0, 0, 0, 1734, - 1735, 1, 0, 0, 0, 1735, 1736, 1, 0, 0, 0, 1736, 1739, 5, 10, 0, 0, 1737, - 1739, 5, 0, 0, 1, 1738, 1734, 1, 0, 0, 0, 1738, 1737, 1, 0, 0, 0, 1739, - 1740, 1, 0, 0, 0, 1740, 1741, 6, 191, 0, 0, 1741, 384, 1, 0, 0, 0, 1742, - 1743, 5, 47, 0, 0, 1743, 1744, 5, 42, 0, 0, 1744, 1748, 1, 0, 0, 0, 1745, - 1747, 9, 0, 0, 0, 1746, 1745, 1, 0, 0, 0, 1747, 1750, 1, 0, 0, 0, 1748, - 1749, 1, 0, 0, 0, 1748, 1746, 1, 0, 0, 0, 1749, 1751, 1, 0, 0, 0, 1750, - 1748, 1, 0, 0, 0, 1751, 1752, 5, 42, 0, 0, 1752, 1753, 5, 47, 0, 0, 1753, - 1754, 1, 0, 0, 0, 1754, 1755, 6, 192, 0, 0, 1755, 386, 1, 0, 0, 0, 1756, - 1757, 7, 9, 0, 0, 1757, 1758, 1, 0, 0, 0, 1758, 1759, 6, 193, 0, 0, 1759, - 388, 1, 0, 0, 0, 1760, 1761, 9, 0, 0, 0, 1761, 390, 1, 0, 0, 0, 1762, 1763, - 7, 10, 0, 0, 1763, 392, 1, 0, 0, 0, 1764, 1765, 7, 11, 0, 0, 1765, 394, - 1, 0, 0, 0, 1766, 1767, 7, 12, 0, 0, 1767, 396, 1, 0, 0, 0, 1768, 1769, - 7, 13, 0, 0, 1769, 398, 1, 0, 0, 0, 1770, 1771, 7, 14, 0, 0, 1771, 400, - 1, 0, 0, 0, 1772, 1773, 7, 15, 0, 0, 1773, 402, 1, 0, 0, 0, 1774, 1775, - 7, 16, 0, 0, 1775, 404, 1, 0, 0, 0, 1776, 1777, 7, 17, 0, 0, 1777, 406, - 1, 0, 0, 0, 1778, 1779, 7, 18, 0, 0, 1779, 408, 1, 0, 0, 0, 1780, 1781, - 7, 19, 0, 0, 1781, 410, 1, 0, 0, 0, 1782, 1783, 7, 20, 0, 0, 1783, 412, - 1, 0, 0, 0, 1784, 1785, 7, 21, 0, 0, 1785, 414, 1, 0, 0, 0, 1786, 1787, - 7, 22, 0, 0, 1787, 416, 1, 0, 0, 0, 1788, 1789, 7, 23, 0, 0, 1789, 418, - 1, 0, 0, 0, 1790, 1791, 7, 24, 0, 0, 1791, 420, 1, 0, 0, 0, 1792, 1793, - 7, 25, 0, 0, 1793, 422, 1, 0, 0, 0, 1794, 1795, 7, 26, 0, 0, 1795, 424, - 1, 0, 0, 0, 1796, 1797, 7, 27, 0, 0, 1797, 426, 1, 0, 0, 0, 1798, 1799, - 7, 28, 0, 0, 1799, 428, 1, 0, 0, 0, 1800, 1801, 7, 29, 0, 0, 1801, 430, - 1, 0, 0, 0, 1802, 1803, 7, 30, 0, 0, 1803, 432, 1, 0, 0, 0, 1804, 1805, - 7, 31, 0, 0, 1805, 434, 1, 0, 0, 0, 1806, 1807, 7, 32, 0, 0, 1807, 436, - 1, 0, 0, 0, 1808, 1809, 7, 33, 0, 0, 1809, 438, 1, 0, 0, 0, 1810, 1811, - 7, 34, 0, 0, 1811, 440, 1, 0, 0, 0, 1812, 1813, 7, 35, 0, 0, 1813, 442, - 1, 0, 0, 0, 1814, 1815, 7, 36, 0, 0, 1815, 444, 1, 0, 0, 0, 1816, 1817, - 7, 37, 0, 0, 1817, 446, 1, 0, 0, 0, 25, 0, 1624, 1626, 1634, 1636, 1644, - 1652, 1655, 1660, 1666, 1669, 1675, 1677, 1681, 1686, 1688, 1696, 1698, - 1704, 1714, 1716, 1730, 1734, 1738, 1748, 1, 0, 1, 0, + 222, 1, 222, 1, 223, 1, 223, 1, 224, 1, 224, 1, 1759, 0, 225, 1, 1, 3, + 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, + 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, + 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, + 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, + 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, + 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, + 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, + 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, + 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, + 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, + 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, + 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, + 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, + 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, + 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, + 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, + 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, + 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, + 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, + 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, + 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, + 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, + 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, + 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, + 389, 195, 391, 196, 393, 197, 395, 0, 397, 0, 399, 0, 401, 0, 403, 0, 405, + 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, 0, 417, 0, 419, 0, 421, 0, 423, + 0, 425, 0, 427, 0, 429, 0, 431, 0, 433, 0, 435, 0, 437, 0, 439, 0, 441, + 0, 443, 0, 445, 0, 447, 0, 449, 0, 1, 0, 38, 1, 0, 34, 34, 1, 0, 96, 96, + 1, 0, 93, 93, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, + 95, 97, 122, 2, 0, 43, 43, 45, 45, 3, 0, 36, 36, 58, 58, 64, 64, 1, 0, + 39, 39, 2, 0, 10, 10, 13, 13, 3, 0, 9, 11, 13, 13, 32, 32, 3, 0, 48, 57, + 65, 70, 97, 102, 1, 0, 48, 57, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, + 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, + 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, + 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, + 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, + 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, + 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, + 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, + 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, + 1826, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, + 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, + 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, + 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, + 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, + 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, + 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, + 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, + 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, + 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, + 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, + 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, + 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, + 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, + 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, + 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, + 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, + 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, + 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, + 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, + 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, + 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, + 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, + 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, + 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, + 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, + 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, + 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, + 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, + 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, + 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, + 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, + 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, + 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, + 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, + 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, + 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, + 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, + 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, + 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, + 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, + 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, + 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, + 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, + 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, + 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, + 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, + 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, + 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, + 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, + 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, + 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, + 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, + 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 1, 451, + 1, 0, 0, 0, 3, 453, 1, 0, 0, 0, 5, 455, 1, 0, 0, 0, 7, 457, 1, 0, 0, 0, + 9, 459, 1, 0, 0, 0, 11, 461, 1, 0, 0, 0, 13, 463, 1, 0, 0, 0, 15, 465, + 1, 0, 0, 0, 17, 467, 1, 0, 0, 0, 19, 471, 1, 0, 0, 0, 21, 474, 1, 0, 0, + 0, 23, 476, 1, 0, 0, 0, 25, 478, 1, 0, 0, 0, 27, 481, 1, 0, 0, 0, 29, 483, + 1, 0, 0, 0, 31, 485, 1, 0, 0, 0, 33, 488, 1, 0, 0, 0, 35, 491, 1, 0, 0, + 0, 37, 493, 1, 0, 0, 0, 39, 495, 1, 0, 0, 0, 41, 497, 1, 0, 0, 0, 43, 500, + 1, 0, 0, 0, 45, 502, 1, 0, 0, 0, 47, 505, 1, 0, 0, 0, 49, 508, 1, 0, 0, + 0, 51, 511, 1, 0, 0, 0, 53, 514, 1, 0, 0, 0, 55, 520, 1, 0, 0, 0, 57, 527, + 1, 0, 0, 0, 59, 531, 1, 0, 0, 0, 61, 537, 1, 0, 0, 0, 63, 541, 1, 0, 0, + 0, 65, 547, 1, 0, 0, 0, 67, 555, 1, 0, 0, 0, 69, 559, 1, 0, 0, 0, 71, 562, + 1, 0, 0, 0, 73, 566, 1, 0, 0, 0, 75, 573, 1, 0, 0, 0, 77, 587, 1, 0, 0, + 0, 79, 594, 1, 0, 0, 0, 81, 600, 1, 0, 0, 0, 83, 608, 1, 0, 0, 0, 85, 611, + 1, 0, 0, 0, 87, 619, 1, 0, 0, 0, 89, 624, 1, 0, 0, 0, 91, 629, 1, 0, 0, + 0, 93, 635, 1, 0, 0, 0, 95, 643, 1, 0, 0, 0, 97, 650, 1, 0, 0, 0, 99, 657, + 1, 0, 0, 0, 101, 666, 1, 0, 0, 0, 103, 677, 1, 0, 0, 0, 105, 684, 1, 0, + 0, 0, 107, 690, 1, 0, 0, 0, 109, 703, 1, 0, 0, 0, 111, 716, 1, 0, 0, 0, + 113, 734, 1, 0, 0, 0, 115, 743, 1, 0, 0, 0, 117, 751, 1, 0, 0, 0, 119, + 762, 1, 0, 0, 0, 121, 771, 1, 0, 0, 0, 123, 778, 1, 0, 0, 0, 125, 783, + 1, 0, 0, 0, 127, 790, 1, 0, 0, 0, 129, 799, 1, 0, 0, 0, 131, 804, 1, 0, + 0, 0, 133, 809, 1, 0, 0, 0, 135, 814, 1, 0, 0, 0, 137, 818, 1, 0, 0, 0, + 139, 825, 1, 0, 0, 0, 141, 832, 1, 0, 0, 0, 143, 842, 1, 0, 0, 0, 145, + 849, 1, 0, 0, 0, 147, 857, 1, 0, 0, 0, 149, 862, 1, 0, 0, 0, 151, 866, + 1, 0, 0, 0, 153, 874, 1, 0, 0, 0, 155, 879, 1, 0, 0, 0, 157, 884, 1, 0, + 0, 0, 159, 889, 1, 0, 0, 0, 161, 895, 1, 0, 0, 0, 163, 902, 1, 0, 0, 0, + 165, 905, 1, 0, 0, 0, 167, 912, 1, 0, 0, 0, 169, 922, 1, 0, 0, 0, 171, + 925, 1, 0, 0, 0, 173, 931, 1, 0, 0, 0, 175, 939, 1, 0, 0, 0, 177, 949, + 1, 0, 0, 0, 179, 955, 1, 0, 0, 0, 181, 962, 1, 0, 0, 0, 183, 970, 1, 0, + 0, 0, 185, 980, 1, 0, 0, 0, 187, 985, 1, 0, 0, 0, 189, 988, 1, 0, 0, 0, + 191, 995, 1, 0, 0, 0, 193, 1000, 1, 0, 0, 0, 195, 1004, 1, 0, 0, 0, 197, + 1009, 1, 0, 0, 0, 199, 1014, 1, 0, 0, 0, 201, 1020, 1, 0, 0, 0, 203, 1026, + 1, 0, 0, 0, 205, 1034, 1, 0, 0, 0, 207, 1037, 1, 0, 0, 0, 209, 1041, 1, + 0, 0, 0, 211, 1049, 1, 0, 0, 0, 213, 1054, 1, 0, 0, 0, 215, 1057, 1, 0, + 0, 0, 217, 1064, 1, 0, 0, 0, 219, 1067, 1, 0, 0, 0, 221, 1070, 1, 0, 0, + 0, 223, 1076, 1, 0, 0, 0, 225, 1082, 1, 0, 0, 0, 227, 1087, 1, 0, 0, 0, + 229, 1094, 1, 0, 0, 0, 231, 1102, 1, 0, 0, 0, 233, 1108, 1, 0, 0, 0, 235, + 1114, 1, 0, 0, 0, 237, 1124, 1, 0, 0, 0, 239, 1135, 1, 0, 0, 0, 241, 1142, + 1, 0, 0, 0, 243, 1150, 1, 0, 0, 0, 245, 1158, 1, 0, 0, 0, 247, 1165, 1, + 0, 0, 0, 249, 1173, 1, 0, 0, 0, 251, 1182, 1, 0, 0, 0, 253, 1192, 1, 0, + 0, 0, 255, 1198, 1, 0, 0, 0, 257, 1207, 1, 0, 0, 0, 259, 1211, 1, 0, 0, + 0, 261, 1216, 1, 0, 0, 0, 263, 1226, 1, 0, 0, 0, 265, 1233, 1, 0, 0, 0, + 267, 1237, 1, 0, 0, 0, 269, 1244, 1, 0, 0, 0, 271, 1250, 1, 0, 0, 0, 273, + 1255, 1, 0, 0, 0, 275, 1265, 1, 0, 0, 0, 277, 1270, 1, 0, 0, 0, 279, 1273, + 1, 0, 0, 0, 281, 1285, 1, 0, 0, 0, 283, 1293, 1, 0, 0, 0, 285, 1299, 1, + 0, 0, 0, 287, 1306, 1, 0, 0, 0, 289, 1313, 1, 0, 0, 0, 291, 1319, 1, 0, + 0, 0, 293, 1326, 1, 0, 0, 0, 295, 1333, 1, 0, 0, 0, 297, 1338, 1, 0, 0, + 0, 299, 1346, 1, 0, 0, 0, 301, 1351, 1, 0, 0, 0, 303, 1357, 1, 0, 0, 0, + 305, 1362, 1, 0, 0, 0, 307, 1370, 1, 0, 0, 0, 309, 1382, 1, 0, 0, 0, 311, + 1387, 1, 0, 0, 0, 313, 1397, 1, 0, 0, 0, 315, 1403, 1, 0, 0, 0, 317, 1413, + 1, 0, 0, 0, 319, 1423, 1, 0, 0, 0, 321, 1431, 1, 0, 0, 0, 323, 1441, 1, + 0, 0, 0, 325, 1451, 1, 0, 0, 0, 327, 1462, 1, 0, 0, 0, 329, 1466, 1, 0, + 0, 0, 331, 1477, 1, 0, 0, 0, 333, 1482, 1, 0, 0, 0, 335, 1492, 1, 0, 0, + 0, 337, 1498, 1, 0, 0, 0, 339, 1511, 1, 0, 0, 0, 341, 1516, 1, 0, 0, 0, + 343, 1527, 1, 0, 0, 0, 345, 1537, 1, 0, 0, 0, 347, 1544, 1, 0, 0, 0, 349, + 1551, 1, 0, 0, 0, 351, 1556, 1, 0, 0, 0, 353, 1562, 1, 0, 0, 0, 355, 1569, + 1, 0, 0, 0, 357, 1575, 1, 0, 0, 0, 359, 1581, 1, 0, 0, 0, 361, 1586, 1, + 0, 0, 0, 363, 1593, 1, 0, 0, 0, 365, 1600, 1, 0, 0, 0, 367, 1608, 1, 0, + 0, 0, 369, 1613, 1, 0, 0, 0, 371, 1620, 1, 0, 0, 0, 373, 1623, 1, 0, 0, + 0, 375, 1666, 1, 0, 0, 0, 377, 1709, 1, 0, 0, 0, 379, 1711, 1, 0, 0, 0, + 381, 1718, 1, 0, 0, 0, 383, 1721, 1, 0, 0, 0, 385, 1732, 1, 0, 0, 0, 387, + 1735, 1, 0, 0, 0, 389, 1753, 1, 0, 0, 0, 391, 1767, 1, 0, 0, 0, 393, 1771, + 1, 0, 0, 0, 395, 1773, 1, 0, 0, 0, 397, 1775, 1, 0, 0, 0, 399, 1777, 1, + 0, 0, 0, 401, 1779, 1, 0, 0, 0, 403, 1781, 1, 0, 0, 0, 405, 1783, 1, 0, + 0, 0, 407, 1785, 1, 0, 0, 0, 409, 1787, 1, 0, 0, 0, 411, 1789, 1, 0, 0, + 0, 413, 1791, 1, 0, 0, 0, 415, 1793, 1, 0, 0, 0, 417, 1795, 1, 0, 0, 0, + 419, 1797, 1, 0, 0, 0, 421, 1799, 1, 0, 0, 0, 423, 1801, 1, 0, 0, 0, 425, + 1803, 1, 0, 0, 0, 427, 1805, 1, 0, 0, 0, 429, 1807, 1, 0, 0, 0, 431, 1809, + 1, 0, 0, 0, 433, 1811, 1, 0, 0, 0, 435, 1813, 1, 0, 0, 0, 437, 1815, 1, + 0, 0, 0, 439, 1817, 1, 0, 0, 0, 441, 1819, 1, 0, 0, 0, 443, 1821, 1, 0, + 0, 0, 445, 1823, 1, 0, 0, 0, 447, 1825, 1, 0, 0, 0, 449, 1827, 1, 0, 0, + 0, 451, 452, 5, 59, 0, 0, 452, 2, 1, 0, 0, 0, 453, 454, 5, 46, 0, 0, 454, + 4, 1, 0, 0, 0, 455, 456, 5, 40, 0, 0, 456, 6, 1, 0, 0, 0, 457, 458, 5, + 41, 0, 0, 458, 8, 1, 0, 0, 0, 459, 460, 5, 44, 0, 0, 460, 10, 1, 0, 0, + 0, 461, 462, 5, 61, 0, 0, 462, 12, 1, 0, 0, 0, 463, 464, 5, 42, 0, 0, 464, + 14, 1, 0, 0, 0, 465, 466, 5, 43, 0, 0, 466, 16, 1, 0, 0, 0, 467, 468, 5, + 45, 0, 0, 468, 469, 5, 62, 0, 0, 469, 470, 5, 62, 0, 0, 470, 18, 1, 0, + 0, 0, 471, 472, 5, 45, 0, 0, 472, 473, 5, 62, 0, 0, 473, 20, 1, 0, 0, 0, + 474, 475, 5, 45, 0, 0, 475, 22, 1, 0, 0, 0, 476, 477, 5, 126, 0, 0, 477, + 24, 1, 0, 0, 0, 478, 479, 5, 124, 0, 0, 479, 480, 5, 124, 0, 0, 480, 26, + 1, 0, 0, 0, 481, 482, 5, 47, 0, 0, 482, 28, 1, 0, 0, 0, 483, 484, 5, 37, + 0, 0, 484, 30, 1, 0, 0, 0, 485, 486, 5, 60, 0, 0, 486, 487, 5, 60, 0, 0, + 487, 32, 1, 0, 0, 0, 488, 489, 5, 62, 0, 0, 489, 490, 5, 62, 0, 0, 490, + 34, 1, 0, 0, 0, 491, 492, 5, 38, 0, 0, 492, 36, 1, 0, 0, 0, 493, 494, 5, + 124, 0, 0, 494, 38, 1, 0, 0, 0, 495, 496, 5, 60, 0, 0, 496, 40, 1, 0, 0, + 0, 497, 498, 5, 60, 0, 0, 498, 499, 5, 61, 0, 0, 499, 42, 1, 0, 0, 0, 500, + 501, 5, 62, 0, 0, 501, 44, 1, 0, 0, 0, 502, 503, 5, 62, 0, 0, 503, 504, + 5, 61, 0, 0, 504, 46, 1, 0, 0, 0, 505, 506, 5, 61, 0, 0, 506, 507, 5, 61, + 0, 0, 507, 48, 1, 0, 0, 0, 508, 509, 5, 33, 0, 0, 509, 510, 5, 61, 0, 0, + 510, 50, 1, 0, 0, 0, 511, 512, 5, 60, 0, 0, 512, 513, 5, 62, 0, 0, 513, + 52, 1, 0, 0, 0, 514, 515, 3, 399, 199, 0, 515, 516, 3, 401, 200, 0, 516, + 517, 3, 427, 213, 0, 517, 518, 3, 433, 216, 0, 518, 519, 3, 437, 218, 0, + 519, 54, 1, 0, 0, 0, 520, 521, 3, 399, 199, 0, 521, 522, 3, 403, 201, 0, + 522, 523, 3, 437, 218, 0, 523, 524, 3, 415, 207, 0, 524, 525, 3, 427, 213, + 0, 525, 526, 3, 425, 212, 0, 526, 56, 1, 0, 0, 0, 527, 528, 3, 399, 199, + 0, 528, 529, 3, 405, 202, 0, 529, 530, 3, 405, 202, 0, 530, 58, 1, 0, 0, + 0, 531, 532, 3, 399, 199, 0, 532, 533, 3, 409, 204, 0, 533, 534, 3, 437, + 218, 0, 534, 535, 3, 407, 203, 0, 535, 536, 3, 433, 216, 0, 536, 60, 1, + 0, 0, 0, 537, 538, 3, 399, 199, 0, 538, 539, 3, 421, 210, 0, 539, 540, + 3, 421, 210, 0, 540, 62, 1, 0, 0, 0, 541, 542, 3, 399, 199, 0, 542, 543, + 3, 421, 210, 0, 543, 544, 3, 437, 218, 0, 544, 545, 3, 407, 203, 0, 545, + 546, 3, 433, 216, 0, 546, 64, 1, 0, 0, 0, 547, 548, 3, 399, 199, 0, 548, + 549, 3, 425, 212, 0, 549, 550, 3, 399, 199, 0, 550, 551, 3, 421, 210, 0, + 551, 552, 3, 447, 223, 0, 552, 553, 3, 449, 224, 0, 553, 554, 3, 407, 203, + 0, 554, 66, 1, 0, 0, 0, 555, 556, 3, 399, 199, 0, 556, 557, 3, 425, 212, + 0, 557, 558, 3, 405, 202, 0, 558, 68, 1, 0, 0, 0, 559, 560, 3, 399, 199, + 0, 560, 561, 3, 435, 217, 0, 561, 70, 1, 0, 0, 0, 562, 563, 3, 399, 199, + 0, 563, 564, 3, 435, 217, 0, 564, 565, 3, 403, 201, 0, 565, 72, 1, 0, 0, + 0, 566, 567, 3, 399, 199, 0, 567, 568, 3, 437, 218, 0, 568, 569, 3, 437, + 218, 0, 569, 570, 3, 399, 199, 0, 570, 571, 3, 403, 201, 0, 571, 572, 3, + 413, 206, 0, 572, 74, 1, 0, 0, 0, 573, 574, 3, 399, 199, 0, 574, 575, 3, + 439, 219, 0, 575, 576, 3, 437, 218, 0, 576, 577, 3, 427, 213, 0, 577, 578, + 3, 415, 207, 0, 578, 579, 3, 425, 212, 0, 579, 580, 3, 403, 201, 0, 580, + 581, 3, 433, 216, 0, 581, 582, 3, 407, 203, 0, 582, 583, 3, 423, 211, 0, + 583, 584, 3, 407, 203, 0, 584, 585, 3, 425, 212, 0, 585, 586, 3, 437, 218, + 0, 586, 76, 1, 0, 0, 0, 587, 588, 3, 401, 200, 0, 588, 589, 3, 407, 203, + 0, 589, 590, 3, 409, 204, 0, 590, 591, 3, 427, 213, 0, 591, 592, 3, 433, + 216, 0, 592, 593, 3, 407, 203, 0, 593, 78, 1, 0, 0, 0, 594, 595, 3, 401, + 200, 0, 595, 596, 3, 407, 203, 0, 596, 597, 3, 411, 205, 0, 597, 598, 3, + 415, 207, 0, 598, 599, 3, 425, 212, 0, 599, 80, 1, 0, 0, 0, 600, 601, 3, + 401, 200, 0, 601, 602, 3, 407, 203, 0, 602, 603, 3, 437, 218, 0, 603, 604, + 3, 443, 221, 0, 604, 605, 3, 407, 203, 0, 605, 606, 3, 407, 203, 0, 606, + 607, 3, 425, 212, 0, 607, 82, 1, 0, 0, 0, 608, 609, 3, 401, 200, 0, 609, + 610, 3, 447, 223, 0, 610, 84, 1, 0, 0, 0, 611, 612, 3, 403, 201, 0, 612, + 613, 3, 399, 199, 0, 613, 614, 3, 435, 217, 0, 614, 615, 3, 403, 201, 0, + 615, 616, 3, 399, 199, 0, 616, 617, 3, 405, 202, 0, 617, 618, 3, 407, 203, + 0, 618, 86, 1, 0, 0, 0, 619, 620, 3, 403, 201, 0, 620, 621, 3, 399, 199, + 0, 621, 622, 3, 435, 217, 0, 622, 623, 3, 407, 203, 0, 623, 88, 1, 0, 0, + 0, 624, 625, 3, 403, 201, 0, 625, 626, 3, 399, 199, 0, 626, 627, 3, 435, + 217, 0, 627, 628, 3, 437, 218, 0, 628, 90, 1, 0, 0, 0, 629, 630, 3, 403, + 201, 0, 630, 631, 3, 413, 206, 0, 631, 632, 3, 407, 203, 0, 632, 633, 3, + 403, 201, 0, 633, 634, 3, 419, 209, 0, 634, 92, 1, 0, 0, 0, 635, 636, 3, + 403, 201, 0, 636, 637, 3, 427, 213, 0, 637, 638, 3, 421, 210, 0, 638, 639, + 3, 421, 210, 0, 639, 640, 3, 399, 199, 0, 640, 641, 3, 437, 218, 0, 641, + 642, 3, 407, 203, 0, 642, 94, 1, 0, 0, 0, 643, 644, 3, 403, 201, 0, 644, + 645, 3, 427, 213, 0, 645, 646, 3, 421, 210, 0, 646, 647, 3, 439, 219, 0, + 647, 648, 3, 423, 211, 0, 648, 649, 3, 425, 212, 0, 649, 96, 1, 0, 0, 0, + 650, 651, 3, 403, 201, 0, 651, 652, 3, 427, 213, 0, 652, 653, 3, 423, 211, + 0, 653, 654, 3, 423, 211, 0, 654, 655, 3, 415, 207, 0, 655, 656, 3, 437, + 218, 0, 656, 98, 1, 0, 0, 0, 657, 658, 3, 403, 201, 0, 658, 659, 3, 427, + 213, 0, 659, 660, 3, 425, 212, 0, 660, 661, 3, 409, 204, 0, 661, 662, 3, + 421, 210, 0, 662, 663, 3, 415, 207, 0, 663, 664, 3, 403, 201, 0, 664, 665, + 3, 437, 218, 0, 665, 100, 1, 0, 0, 0, 666, 667, 3, 403, 201, 0, 667, 668, + 3, 427, 213, 0, 668, 669, 3, 425, 212, 0, 669, 670, 3, 435, 217, 0, 670, + 671, 3, 437, 218, 0, 671, 672, 3, 433, 216, 0, 672, 673, 3, 399, 199, 0, + 673, 674, 3, 415, 207, 0, 674, 675, 3, 425, 212, 0, 675, 676, 3, 437, 218, + 0, 676, 102, 1, 0, 0, 0, 677, 678, 3, 403, 201, 0, 678, 679, 3, 433, 216, + 0, 679, 680, 3, 407, 203, 0, 680, 681, 3, 399, 199, 0, 681, 682, 3, 437, + 218, 0, 682, 683, 3, 407, 203, 0, 683, 104, 1, 0, 0, 0, 684, 685, 3, 403, + 201, 0, 685, 686, 3, 433, 216, 0, 686, 687, 3, 427, 213, 0, 687, 688, 3, + 435, 217, 0, 688, 689, 3, 435, 217, 0, 689, 106, 1, 0, 0, 0, 690, 691, + 3, 403, 201, 0, 691, 692, 3, 439, 219, 0, 692, 693, 3, 433, 216, 0, 693, + 694, 3, 433, 216, 0, 694, 695, 3, 407, 203, 0, 695, 696, 3, 425, 212, 0, + 696, 697, 3, 437, 218, 0, 697, 698, 5, 95, 0, 0, 698, 699, 3, 405, 202, + 0, 699, 700, 3, 399, 199, 0, 700, 701, 3, 437, 218, 0, 701, 702, 3, 407, + 203, 0, 702, 108, 1, 0, 0, 0, 703, 704, 3, 403, 201, 0, 704, 705, 3, 439, + 219, 0, 705, 706, 3, 433, 216, 0, 706, 707, 3, 433, 216, 0, 707, 708, 3, + 407, 203, 0, 708, 709, 3, 425, 212, 0, 709, 710, 3, 437, 218, 0, 710, 711, + 5, 95, 0, 0, 711, 712, 3, 437, 218, 0, 712, 713, 3, 415, 207, 0, 713, 714, + 3, 423, 211, 0, 714, 715, 3, 407, 203, 0, 715, 110, 1, 0, 0, 0, 716, 717, + 3, 403, 201, 0, 717, 718, 3, 439, 219, 0, 718, 719, 3, 433, 216, 0, 719, + 720, 3, 433, 216, 0, 720, 721, 3, 407, 203, 0, 721, 722, 3, 425, 212, 0, + 722, 723, 3, 437, 218, 0, 723, 724, 5, 95, 0, 0, 724, 725, 3, 437, 218, + 0, 725, 726, 3, 415, 207, 0, 726, 727, 3, 423, 211, 0, 727, 728, 3, 407, + 203, 0, 728, 729, 3, 435, 217, 0, 729, 730, 3, 437, 218, 0, 730, 731, 3, + 399, 199, 0, 731, 732, 3, 423, 211, 0, 732, 733, 3, 429, 214, 0, 733, 112, + 1, 0, 0, 0, 734, 735, 3, 405, 202, 0, 735, 736, 3, 399, 199, 0, 736, 737, + 3, 437, 218, 0, 737, 738, 3, 399, 199, 0, 738, 739, 3, 401, 200, 0, 739, + 740, 3, 399, 199, 0, 740, 741, 3, 435, 217, 0, 741, 742, 3, 407, 203, 0, + 742, 114, 1, 0, 0, 0, 743, 744, 3, 405, 202, 0, 744, 745, 3, 407, 203, + 0, 745, 746, 3, 409, 204, 0, 746, 747, 3, 399, 199, 0, 747, 748, 3, 439, + 219, 0, 748, 749, 3, 421, 210, 0, 749, 750, 3, 437, 218, 0, 750, 116, 1, + 0, 0, 0, 751, 752, 3, 405, 202, 0, 752, 753, 3, 407, 203, 0, 753, 754, + 3, 409, 204, 0, 754, 755, 3, 407, 203, 0, 755, 756, 3, 433, 216, 0, 756, + 757, 3, 433, 216, 0, 757, 758, 3, 399, 199, 0, 758, 759, 3, 401, 200, 0, + 759, 760, 3, 421, 210, 0, 760, 761, 3, 407, 203, 0, 761, 118, 1, 0, 0, + 0, 762, 763, 3, 405, 202, 0, 763, 764, 3, 407, 203, 0, 764, 765, 3, 409, + 204, 0, 765, 766, 3, 407, 203, 0, 766, 767, 3, 433, 216, 0, 767, 768, 3, + 433, 216, 0, 768, 769, 3, 407, 203, 0, 769, 770, 3, 405, 202, 0, 770, 120, + 1, 0, 0, 0, 771, 772, 3, 405, 202, 0, 772, 773, 3, 407, 203, 0, 773, 774, + 3, 421, 210, 0, 774, 775, 3, 407, 203, 0, 775, 776, 3, 437, 218, 0, 776, + 777, 3, 407, 203, 0, 777, 122, 1, 0, 0, 0, 778, 779, 3, 405, 202, 0, 779, + 780, 3, 407, 203, 0, 780, 781, 3, 435, 217, 0, 781, 782, 3, 403, 201, 0, + 782, 124, 1, 0, 0, 0, 783, 784, 3, 405, 202, 0, 784, 785, 3, 407, 203, + 0, 785, 786, 3, 437, 218, 0, 786, 787, 3, 399, 199, 0, 787, 788, 3, 403, + 201, 0, 788, 789, 3, 413, 206, 0, 789, 126, 1, 0, 0, 0, 790, 791, 3, 405, + 202, 0, 791, 792, 3, 415, 207, 0, 792, 793, 3, 435, 217, 0, 793, 794, 3, + 437, 218, 0, 794, 795, 3, 415, 207, 0, 795, 796, 3, 425, 212, 0, 796, 797, + 3, 403, 201, 0, 797, 798, 3, 437, 218, 0, 798, 128, 1, 0, 0, 0, 799, 800, + 3, 405, 202, 0, 800, 801, 3, 433, 216, 0, 801, 802, 3, 427, 213, 0, 802, + 803, 3, 429, 214, 0, 803, 130, 1, 0, 0, 0, 804, 805, 3, 407, 203, 0, 805, + 806, 3, 399, 199, 0, 806, 807, 3, 403, 201, 0, 807, 808, 3, 413, 206, 0, + 808, 132, 1, 0, 0, 0, 809, 810, 3, 407, 203, 0, 810, 811, 3, 421, 210, + 0, 811, 812, 3, 435, 217, 0, 812, 813, 3, 407, 203, 0, 813, 134, 1, 0, + 0, 0, 814, 815, 3, 407, 203, 0, 815, 816, 3, 425, 212, 0, 816, 817, 3, + 405, 202, 0, 817, 136, 1, 0, 0, 0, 818, 819, 3, 407, 203, 0, 819, 820, + 3, 435, 217, 0, 820, 821, 3, 403, 201, 0, 821, 822, 3, 399, 199, 0, 822, + 823, 3, 429, 214, 0, 823, 824, 3, 407, 203, 0, 824, 138, 1, 0, 0, 0, 825, + 826, 3, 407, 203, 0, 826, 827, 3, 445, 222, 0, 827, 828, 3, 403, 201, 0, + 828, 829, 3, 407, 203, 0, 829, 830, 3, 429, 214, 0, 830, 831, 3, 437, 218, + 0, 831, 140, 1, 0, 0, 0, 832, 833, 3, 407, 203, 0, 833, 834, 3, 445, 222, + 0, 834, 835, 3, 403, 201, 0, 835, 836, 3, 421, 210, 0, 836, 837, 3, 439, + 219, 0, 837, 838, 3, 435, 217, 0, 838, 839, 3, 415, 207, 0, 839, 840, 3, + 441, 220, 0, 840, 841, 3, 407, 203, 0, 841, 142, 1, 0, 0, 0, 842, 843, + 3, 407, 203, 0, 843, 844, 3, 445, 222, 0, 844, 845, 3, 415, 207, 0, 845, + 846, 3, 435, 217, 0, 846, 847, 3, 437, 218, 0, 847, 848, 3, 435, 217, 0, + 848, 144, 1, 0, 0, 0, 849, 850, 3, 407, 203, 0, 850, 851, 3, 445, 222, + 0, 851, 852, 3, 429, 214, 0, 852, 853, 3, 421, 210, 0, 853, 854, 3, 399, + 199, 0, 854, 855, 3, 415, 207, 0, 855, 856, 3, 425, 212, 0, 856, 146, 1, + 0, 0, 0, 857, 858, 3, 409, 204, 0, 858, 859, 3, 399, 199, 0, 859, 860, + 3, 415, 207, 0, 860, 861, 3, 421, 210, 0, 861, 148, 1, 0, 0, 0, 862, 863, + 3, 409, 204, 0, 863, 864, 3, 427, 213, 0, 864, 865, 3, 433, 216, 0, 865, + 150, 1, 0, 0, 0, 866, 867, 3, 409, 204, 0, 867, 868, 3, 427, 213, 0, 868, + 869, 3, 433, 216, 0, 869, 870, 3, 407, 203, 0, 870, 871, 3, 415, 207, 0, + 871, 872, 3, 411, 205, 0, 872, 873, 3, 425, 212, 0, 873, 152, 1, 0, 0, + 0, 874, 875, 3, 409, 204, 0, 875, 876, 3, 433, 216, 0, 876, 877, 3, 427, + 213, 0, 877, 878, 3, 423, 211, 0, 878, 154, 1, 0, 0, 0, 879, 880, 3, 409, + 204, 0, 880, 881, 3, 439, 219, 0, 881, 882, 3, 421, 210, 0, 882, 883, 3, + 421, 210, 0, 883, 156, 1, 0, 0, 0, 884, 885, 3, 411, 205, 0, 885, 886, + 3, 421, 210, 0, 886, 887, 3, 427, 213, 0, 887, 888, 3, 401, 200, 0, 888, + 158, 1, 0, 0, 0, 889, 890, 3, 411, 205, 0, 890, 891, 3, 433, 216, 0, 891, + 892, 3, 427, 213, 0, 892, 893, 3, 439, 219, 0, 893, 894, 3, 429, 214, 0, + 894, 160, 1, 0, 0, 0, 895, 896, 3, 413, 206, 0, 896, 897, 3, 399, 199, + 0, 897, 898, 3, 441, 220, 0, 898, 899, 3, 415, 207, 0, 899, 900, 3, 425, + 212, 0, 900, 901, 3, 411, 205, 0, 901, 162, 1, 0, 0, 0, 902, 903, 3, 415, + 207, 0, 903, 904, 3, 409, 204, 0, 904, 164, 1, 0, 0, 0, 905, 906, 3, 415, + 207, 0, 906, 907, 3, 411, 205, 0, 907, 908, 3, 425, 212, 0, 908, 909, 3, + 427, 213, 0, 909, 910, 3, 433, 216, 0, 910, 911, 3, 407, 203, 0, 911, 166, + 1, 0, 0, 0, 912, 913, 3, 415, 207, 0, 913, 914, 3, 423, 211, 0, 914, 915, + 3, 423, 211, 0, 915, 916, 3, 407, 203, 0, 916, 917, 3, 405, 202, 0, 917, + 918, 3, 415, 207, 0, 918, 919, 3, 399, 199, 0, 919, 920, 3, 437, 218, 0, + 920, 921, 3, 407, 203, 0, 921, 168, 1, 0, 0, 0, 922, 923, 3, 415, 207, + 0, 923, 924, 3, 425, 212, 0, 924, 170, 1, 0, 0, 0, 925, 926, 3, 415, 207, + 0, 926, 927, 3, 425, 212, 0, 927, 928, 3, 405, 202, 0, 928, 929, 3, 407, + 203, 0, 929, 930, 3, 445, 222, 0, 930, 172, 1, 0, 0, 0, 931, 932, 3, 415, + 207, 0, 932, 933, 3, 425, 212, 0, 933, 934, 3, 405, 202, 0, 934, 935, 3, + 407, 203, 0, 935, 936, 3, 445, 222, 0, 936, 937, 3, 407, 203, 0, 937, 938, + 3, 405, 202, 0, 938, 174, 1, 0, 0, 0, 939, 940, 3, 415, 207, 0, 940, 941, + 3, 425, 212, 0, 941, 942, 3, 415, 207, 0, 942, 943, 3, 437, 218, 0, 943, + 944, 3, 415, 207, 0, 944, 945, 3, 399, 199, 0, 945, 946, 3, 421, 210, 0, + 946, 947, 3, 421, 210, 0, 947, 948, 3, 447, 223, 0, 948, 176, 1, 0, 0, + 0, 949, 950, 3, 415, 207, 0, 950, 951, 3, 425, 212, 0, 951, 952, 3, 425, + 212, 0, 952, 953, 3, 407, 203, 0, 953, 954, 3, 433, 216, 0, 954, 178, 1, + 0, 0, 0, 955, 956, 3, 415, 207, 0, 956, 957, 3, 425, 212, 0, 957, 958, + 3, 435, 217, 0, 958, 959, 3, 407, 203, 0, 959, 960, 3, 433, 216, 0, 960, + 961, 3, 437, 218, 0, 961, 180, 1, 0, 0, 0, 962, 963, 3, 415, 207, 0, 963, + 964, 3, 425, 212, 0, 964, 965, 3, 435, 217, 0, 965, 966, 3, 437, 218, 0, + 966, 967, 3, 407, 203, 0, 967, 968, 3, 399, 199, 0, 968, 969, 3, 405, 202, + 0, 969, 182, 1, 0, 0, 0, 970, 971, 3, 415, 207, 0, 971, 972, 3, 425, 212, + 0, 972, 973, 3, 437, 218, 0, 973, 974, 3, 407, 203, 0, 974, 975, 3, 433, + 216, 0, 975, 976, 3, 435, 217, 0, 976, 977, 3, 407, 203, 0, 977, 978, 3, + 403, 201, 0, 978, 979, 3, 437, 218, 0, 979, 184, 1, 0, 0, 0, 980, 981, + 3, 415, 207, 0, 981, 982, 3, 425, 212, 0, 982, 983, 3, 437, 218, 0, 983, + 984, 3, 427, 213, 0, 984, 186, 1, 0, 0, 0, 985, 986, 3, 415, 207, 0, 986, + 987, 3, 435, 217, 0, 987, 188, 1, 0, 0, 0, 988, 989, 3, 415, 207, 0, 989, + 990, 3, 435, 217, 0, 990, 991, 3, 425, 212, 0, 991, 992, 3, 439, 219, 0, + 992, 993, 3, 421, 210, 0, 993, 994, 3, 421, 210, 0, 994, 190, 1, 0, 0, + 0, 995, 996, 3, 417, 208, 0, 996, 997, 3, 427, 213, 0, 997, 998, 3, 415, + 207, 0, 998, 999, 3, 425, 212, 0, 999, 192, 1, 0, 0, 0, 1000, 1001, 3, + 419, 209, 0, 1001, 1002, 3, 407, 203, 0, 1002, 1003, 3, 447, 223, 0, 1003, + 194, 1, 0, 0, 0, 1004, 1005, 3, 421, 210, 0, 1005, 1006, 3, 407, 203, 0, + 1006, 1007, 3, 409, 204, 0, 1007, 1008, 3, 437, 218, 0, 1008, 196, 1, 0, + 0, 0, 1009, 1010, 3, 421, 210, 0, 1010, 1011, 3, 415, 207, 0, 1011, 1012, + 3, 419, 209, 0, 1012, 1013, 3, 407, 203, 0, 1013, 198, 1, 0, 0, 0, 1014, + 1015, 3, 421, 210, 0, 1015, 1016, 3, 415, 207, 0, 1016, 1017, 3, 423, 211, + 0, 1017, 1018, 3, 415, 207, 0, 1018, 1019, 3, 437, 218, 0, 1019, 200, 1, + 0, 0, 0, 1020, 1021, 3, 423, 211, 0, 1021, 1022, 3, 399, 199, 0, 1022, + 1023, 3, 437, 218, 0, 1023, 1024, 3, 403, 201, 0, 1024, 1025, 3, 413, 206, + 0, 1025, 202, 1, 0, 0, 0, 1026, 1027, 3, 425, 212, 0, 1027, 1028, 3, 399, + 199, 0, 1028, 1029, 3, 437, 218, 0, 1029, 1030, 3, 439, 219, 0, 1030, 1031, + 3, 433, 216, 0, 1031, 1032, 3, 399, 199, 0, 1032, 1033, 3, 421, 210, 0, + 1033, 204, 1, 0, 0, 0, 1034, 1035, 3, 425, 212, 0, 1035, 1036, 3, 427, + 213, 0, 1036, 206, 1, 0, 0, 0, 1037, 1038, 3, 425, 212, 0, 1038, 1039, + 3, 427, 213, 0, 1039, 1040, 3, 437, 218, 0, 1040, 208, 1, 0, 0, 0, 1041, + 1042, 3, 425, 212, 0, 1042, 1043, 3, 427, 213, 0, 1043, 1044, 3, 437, 218, + 0, 1044, 1045, 3, 425, 212, 0, 1045, 1046, 3, 439, 219, 0, 1046, 1047, + 3, 421, 210, 0, 1047, 1048, 3, 421, 210, 0, 1048, 210, 1, 0, 0, 0, 1049, + 1050, 3, 425, 212, 0, 1050, 1051, 3, 439, 219, 0, 1051, 1052, 3, 421, 210, + 0, 1052, 1053, 3, 421, 210, 0, 1053, 212, 1, 0, 0, 0, 1054, 1055, 3, 427, + 213, 0, 1055, 1056, 3, 409, 204, 0, 1056, 214, 1, 0, 0, 0, 1057, 1058, + 3, 427, 213, 0, 1058, 1059, 3, 409, 204, 0, 1059, 1060, 3, 409, 204, 0, + 1060, 1061, 3, 435, 217, 0, 1061, 1062, 3, 407, 203, 0, 1062, 1063, 3, + 437, 218, 0, 1063, 216, 1, 0, 0, 0, 1064, 1065, 3, 427, 213, 0, 1065, 1066, + 3, 425, 212, 0, 1066, 218, 1, 0, 0, 0, 1067, 1068, 3, 427, 213, 0, 1068, + 1069, 3, 433, 216, 0, 1069, 220, 1, 0, 0, 0, 1070, 1071, 3, 427, 213, 0, + 1071, 1072, 3, 433, 216, 0, 1072, 1073, 3, 405, 202, 0, 1073, 1074, 3, + 407, 203, 0, 1074, 1075, 3, 433, 216, 0, 1075, 222, 1, 0, 0, 0, 1076, 1077, + 3, 427, 213, 0, 1077, 1078, 3, 439, 219, 0, 1078, 1079, 3, 437, 218, 0, + 1079, 1080, 3, 407, 203, 0, 1080, 1081, 3, 433, 216, 0, 1081, 224, 1, 0, + 0, 0, 1082, 1083, 3, 429, 214, 0, 1083, 1084, 3, 421, 210, 0, 1084, 1085, + 3, 399, 199, 0, 1085, 1086, 3, 425, 212, 0, 1086, 226, 1, 0, 0, 0, 1087, + 1088, 3, 429, 214, 0, 1088, 1089, 3, 433, 216, 0, 1089, 1090, 3, 399, 199, + 0, 1090, 1091, 3, 411, 205, 0, 1091, 1092, 3, 423, 211, 0, 1092, 1093, + 3, 399, 199, 0, 1093, 228, 1, 0, 0, 0, 1094, 1095, 3, 429, 214, 0, 1095, + 1096, 3, 433, 216, 0, 1096, 1097, 3, 415, 207, 0, 1097, 1098, 3, 423, 211, + 0, 1098, 1099, 3, 399, 199, 0, 1099, 1100, 3, 433, 216, 0, 1100, 1101, + 3, 447, 223, 0, 1101, 230, 1, 0, 0, 0, 1102, 1103, 3, 431, 215, 0, 1103, + 1104, 3, 439, 219, 0, 1104, 1105, 3, 407, 203, 0, 1105, 1106, 3, 433, 216, + 0, 1106, 1107, 3, 447, 223, 0, 1107, 232, 1, 0, 0, 0, 1108, 1109, 3, 433, + 216, 0, 1109, 1110, 3, 399, 199, 0, 1110, 1111, 3, 415, 207, 0, 1111, 1112, + 3, 435, 217, 0, 1112, 1113, 3, 407, 203, 0, 1113, 234, 1, 0, 0, 0, 1114, + 1115, 3, 433, 216, 0, 1115, 1116, 3, 407, 203, 0, 1116, 1117, 3, 403, 201, + 0, 1117, 1118, 3, 439, 219, 0, 1118, 1119, 3, 433, 216, 0, 1119, 1120, + 3, 435, 217, 0, 1120, 1121, 3, 415, 207, 0, 1121, 1122, 3, 441, 220, 0, + 1122, 1123, 3, 407, 203, 0, 1123, 236, 1, 0, 0, 0, 1124, 1125, 3, 433, + 216, 0, 1125, 1126, 3, 407, 203, 0, 1126, 1127, 3, 409, 204, 0, 1127, 1128, + 3, 407, 203, 0, 1128, 1129, 3, 433, 216, 0, 1129, 1130, 3, 407, 203, 0, + 1130, 1131, 3, 425, 212, 0, 1131, 1132, 3, 403, 201, 0, 1132, 1133, 3, + 407, 203, 0, 1133, 1134, 3, 435, 217, 0, 1134, 238, 1, 0, 0, 0, 1135, 1136, + 3, 433, 216, 0, 1136, 1137, 3, 407, 203, 0, 1137, 1138, 3, 411, 205, 0, + 1138, 1139, 3, 407, 203, 0, 1139, 1140, 3, 445, 222, 0, 1140, 1141, 3, + 429, 214, 0, 1141, 240, 1, 0, 0, 0, 1142, 1143, 3, 433, 216, 0, 1143, 1144, + 3, 407, 203, 0, 1144, 1145, 3, 415, 207, 0, 1145, 1146, 3, 425, 212, 0, + 1146, 1147, 3, 405, 202, 0, 1147, 1148, 3, 407, 203, 0, 1148, 1149, 3, + 445, 222, 0, 1149, 242, 1, 0, 0, 0, 1150, 1151, 3, 433, 216, 0, 1151, 1152, + 3, 407, 203, 0, 1152, 1153, 3, 421, 210, 0, 1153, 1154, 3, 407, 203, 0, + 1154, 1155, 3, 399, 199, 0, 1155, 1156, 3, 435, 217, 0, 1156, 1157, 3, + 407, 203, 0, 1157, 244, 1, 0, 0, 0, 1158, 1159, 3, 433, 216, 0, 1159, 1160, + 3, 407, 203, 0, 1160, 1161, 3, 425, 212, 0, 1161, 1162, 3, 399, 199, 0, + 1162, 1163, 3, 423, 211, 0, 1163, 1164, 3, 407, 203, 0, 1164, 246, 1, 0, + 0, 0, 1165, 1166, 3, 433, 216, 0, 1166, 1167, 3, 407, 203, 0, 1167, 1168, + 3, 429, 214, 0, 1168, 1169, 3, 421, 210, 0, 1169, 1170, 3, 399, 199, 0, + 1170, 1171, 3, 403, 201, 0, 1171, 1172, 3, 407, 203, 0, 1172, 248, 1, 0, + 0, 0, 1173, 1174, 3, 433, 216, 0, 1174, 1175, 3, 407, 203, 0, 1175, 1176, + 3, 435, 217, 0, 1176, 1177, 3, 437, 218, 0, 1177, 1178, 3, 433, 216, 0, + 1178, 1179, 3, 415, 207, 0, 1179, 1180, 3, 403, 201, 0, 1180, 1181, 3, + 437, 218, 0, 1181, 250, 1, 0, 0, 0, 1182, 1183, 3, 433, 216, 0, 1183, 1184, + 3, 407, 203, 0, 1184, 1185, 3, 437, 218, 0, 1185, 1186, 3, 439, 219, 0, + 1186, 1187, 3, 433, 216, 0, 1187, 1188, 3, 425, 212, 0, 1188, 1189, 3, + 415, 207, 0, 1189, 1190, 3, 425, 212, 0, 1190, 1191, 3, 411, 205, 0, 1191, + 252, 1, 0, 0, 0, 1192, 1193, 3, 433, 216, 0, 1193, 1194, 3, 415, 207, 0, + 1194, 1195, 3, 411, 205, 0, 1195, 1196, 3, 413, 206, 0, 1196, 1197, 3, + 437, 218, 0, 1197, 254, 1, 0, 0, 0, 1198, 1199, 3, 433, 216, 0, 1199, 1200, + 3, 427, 213, 0, 1200, 1201, 3, 421, 210, 0, 1201, 1202, 3, 421, 210, 0, + 1202, 1203, 3, 401, 200, 0, 1203, 1204, 3, 399, 199, 0, 1204, 1205, 3, + 403, 201, 0, 1205, 1206, 3, 419, 209, 0, 1206, 256, 1, 0, 0, 0, 1207, 1208, + 3, 433, 216, 0, 1208, 1209, 3, 427, 213, 0, 1209, 1210, 3, 443, 221, 0, + 1210, 258, 1, 0, 0, 0, 1211, 1212, 3, 433, 216, 0, 1212, 1213, 3, 427, + 213, 0, 1213, 1214, 3, 443, 221, 0, 1214, 1215, 3, 435, 217, 0, 1215, 260, + 1, 0, 0, 0, 1216, 1217, 3, 435, 217, 0, 1217, 1218, 3, 399, 199, 0, 1218, + 1219, 3, 441, 220, 0, 1219, 1220, 3, 407, 203, 0, 1220, 1221, 3, 429, 214, + 0, 1221, 1222, 3, 427, 213, 0, 1222, 1223, 3, 415, 207, 0, 1223, 1224, + 3, 425, 212, 0, 1224, 1225, 3, 437, 218, 0, 1225, 262, 1, 0, 0, 0, 1226, + 1227, 3, 435, 217, 0, 1227, 1228, 3, 407, 203, 0, 1228, 1229, 3, 421, 210, + 0, 1229, 1230, 3, 407, 203, 0, 1230, 1231, 3, 403, 201, 0, 1231, 1232, + 3, 437, 218, 0, 1232, 264, 1, 0, 0, 0, 1233, 1234, 3, 435, 217, 0, 1234, + 1235, 3, 407, 203, 0, 1235, 1236, 3, 437, 218, 0, 1236, 266, 1, 0, 0, 0, + 1237, 1238, 3, 435, 217, 0, 1238, 1239, 3, 437, 218, 0, 1239, 1240, 3, + 433, 216, 0, 1240, 1241, 3, 415, 207, 0, 1241, 1242, 3, 403, 201, 0, 1242, + 1243, 3, 437, 218, 0, 1243, 268, 1, 0, 0, 0, 1244, 1245, 3, 437, 218, 0, + 1245, 1246, 3, 399, 199, 0, 1246, 1247, 3, 401, 200, 0, 1247, 1248, 3, + 421, 210, 0, 1248, 1249, 3, 407, 203, 0, 1249, 270, 1, 0, 0, 0, 1250, 1251, + 3, 437, 218, 0, 1251, 1252, 3, 407, 203, 0, 1252, 1253, 3, 423, 211, 0, + 1253, 1254, 3, 429, 214, 0, 1254, 272, 1, 0, 0, 0, 1255, 1256, 3, 437, + 218, 0, 1256, 1257, 3, 407, 203, 0, 1257, 1258, 3, 423, 211, 0, 1258, 1259, + 3, 429, 214, 0, 1259, 1260, 3, 427, 213, 0, 1260, 1261, 3, 433, 216, 0, + 1261, 1262, 3, 399, 199, 0, 1262, 1263, 3, 433, 216, 0, 1263, 1264, 3, + 447, 223, 0, 1264, 274, 1, 0, 0, 0, 1265, 1266, 3, 437, 218, 0, 1266, 1267, + 3, 413, 206, 0, 1267, 1268, 3, 407, 203, 0, 1268, 1269, 3, 425, 212, 0, + 1269, 276, 1, 0, 0, 0, 1270, 1271, 3, 437, 218, 0, 1271, 1272, 3, 427, + 213, 0, 1272, 278, 1, 0, 0, 0, 1273, 1274, 3, 437, 218, 0, 1274, 1275, + 3, 433, 216, 0, 1275, 1276, 3, 399, 199, 0, 1276, 1277, 3, 425, 212, 0, + 1277, 1278, 3, 435, 217, 0, 1278, 1279, 3, 399, 199, 0, 1279, 1280, 3, + 403, 201, 0, 1280, 1281, 3, 437, 218, 0, 1281, 1282, 3, 415, 207, 0, 1282, + 1283, 3, 427, 213, 0, 1283, 1284, 3, 425, 212, 0, 1284, 280, 1, 0, 0, 0, + 1285, 1286, 3, 437, 218, 0, 1286, 1287, 3, 433, 216, 0, 1287, 1288, 3, + 415, 207, 0, 1288, 1289, 3, 411, 205, 0, 1289, 1290, 3, 411, 205, 0, 1290, + 1291, 3, 407, 203, 0, 1291, 1292, 3, 433, 216, 0, 1292, 282, 1, 0, 0, 0, + 1293, 1294, 3, 439, 219, 0, 1294, 1295, 3, 425, 212, 0, 1295, 1296, 3, + 415, 207, 0, 1296, 1297, 3, 427, 213, 0, 1297, 1298, 3, 425, 212, 0, 1298, + 284, 1, 0, 0, 0, 1299, 1300, 3, 439, 219, 0, 1300, 1301, 3, 425, 212, 0, + 1301, 1302, 3, 415, 207, 0, 1302, 1303, 3, 431, 215, 0, 1303, 1304, 3, + 439, 219, 0, 1304, 1305, 3, 407, 203, 0, 1305, 286, 1, 0, 0, 0, 1306, 1307, + 3, 439, 219, 0, 1307, 1308, 3, 429, 214, 0, 1308, 1309, 3, 405, 202, 0, + 1309, 1310, 3, 399, 199, 0, 1310, 1311, 3, 437, 218, 0, 1311, 1312, 3, + 407, 203, 0, 1312, 288, 1, 0, 0, 0, 1313, 1314, 3, 439, 219, 0, 1314, 1315, + 3, 435, 217, 0, 1315, 1316, 3, 415, 207, 0, 1316, 1317, 3, 425, 212, 0, + 1317, 1318, 3, 411, 205, 0, 1318, 290, 1, 0, 0, 0, 1319, 1320, 3, 441, + 220, 0, 1320, 1321, 3, 399, 199, 0, 1321, 1322, 3, 403, 201, 0, 1322, 1323, + 3, 439, 219, 0, 1323, 1324, 3, 439, 219, 0, 1324, 1325, 3, 423, 211, 0, + 1325, 292, 1, 0, 0, 0, 1326, 1327, 3, 441, 220, 0, 1327, 1328, 3, 399, + 199, 0, 1328, 1329, 3, 421, 210, 0, 1329, 1330, 3, 439, 219, 0, 1330, 1331, + 3, 407, 203, 0, 1331, 1332, 3, 435, 217, 0, 1332, 294, 1, 0, 0, 0, 1333, + 1334, 3, 441, 220, 0, 1334, 1335, 3, 415, 207, 0, 1335, 1336, 3, 407, 203, + 0, 1336, 1337, 3, 443, 221, 0, 1337, 296, 1, 0, 0, 0, 1338, 1339, 3, 441, + 220, 0, 1339, 1340, 3, 415, 207, 0, 1340, 1341, 3, 433, 216, 0, 1341, 1342, + 3, 437, 218, 0, 1342, 1343, 3, 439, 219, 0, 1343, 1344, 3, 399, 199, 0, + 1344, 1345, 3, 421, 210, 0, 1345, 298, 1, 0, 0, 0, 1346, 1347, 3, 443, + 221, 0, 1347, 1348, 3, 413, 206, 0, 1348, 1349, 3, 407, 203, 0, 1349, 1350, + 3, 425, 212, 0, 1350, 300, 1, 0, 0, 0, 1351, 1352, 3, 443, 221, 0, 1352, + 1353, 3, 413, 206, 0, 1353, 1354, 3, 407, 203, 0, 1354, 1355, 3, 433, 216, + 0, 1355, 1356, 3, 407, 203, 0, 1356, 302, 1, 0, 0, 0, 1357, 1358, 3, 443, + 221, 0, 1358, 1359, 3, 415, 207, 0, 1359, 1360, 3, 437, 218, 0, 1360, 1361, + 3, 413, 206, 0, 1361, 304, 1, 0, 0, 0, 1362, 1363, 3, 443, 221, 0, 1363, + 1364, 3, 415, 207, 0, 1364, 1365, 3, 437, 218, 0, 1365, 1366, 3, 413, 206, + 0, 1366, 1367, 3, 427, 213, 0, 1367, 1368, 3, 439, 219, 0, 1368, 1369, + 3, 437, 218, 0, 1369, 306, 1, 0, 0, 0, 1370, 1371, 3, 409, 204, 0, 1371, + 1372, 3, 415, 207, 0, 1372, 1373, 3, 433, 216, 0, 1373, 1374, 3, 435, 217, + 0, 1374, 1375, 3, 437, 218, 0, 1375, 1376, 5, 95, 0, 0, 1376, 1377, 3, + 441, 220, 0, 1377, 1378, 3, 399, 199, 0, 1378, 1379, 3, 421, 210, 0, 1379, + 1380, 3, 439, 219, 0, 1380, 1381, 3, 407, 203, 0, 1381, 308, 1, 0, 0, 0, + 1382, 1383, 3, 427, 213, 0, 1383, 1384, 3, 441, 220, 0, 1384, 1385, 3, + 407, 203, 0, 1385, 1386, 3, 433, 216, 0, 1386, 310, 1, 0, 0, 0, 1387, 1388, + 3, 429, 214, 0, 1388, 1389, 3, 399, 199, 0, 1389, 1390, 3, 433, 216, 0, + 1390, 1391, 3, 437, 218, 0, 1391, 1392, 3, 415, 207, 0, 1392, 1393, 3, + 437, 218, 0, 1393, 1394, 3, 415, 207, 0, 1394, 1395, 3, 427, 213, 0, 1395, + 1396, 3, 425, 212, 0, 1396, 312, 1, 0, 0, 0, 1397, 1398, 3, 433, 216, 0, + 1398, 1399, 3, 399, 199, 0, 1399, 1400, 3, 425, 212, 0, 1400, 1401, 3, + 411, 205, 0, 1401, 1402, 3, 407, 203, 0, 1402, 314, 1, 0, 0, 0, 1403, 1404, + 3, 429, 214, 0, 1404, 1405, 3, 433, 216, 0, 1405, 1406, 3, 407, 203, 0, + 1406, 1407, 3, 403, 201, 0, 1407, 1408, 3, 407, 203, 0, 1408, 1409, 3, + 405, 202, 0, 1409, 1410, 3, 415, 207, 0, 1410, 1411, 3, 425, 212, 0, 1411, + 1412, 3, 411, 205, 0, 1412, 316, 1, 0, 0, 0, 1413, 1414, 3, 439, 219, 0, + 1414, 1415, 3, 425, 212, 0, 1415, 1416, 3, 401, 200, 0, 1416, 1417, 3, + 427, 213, 0, 1417, 1418, 3, 439, 219, 0, 1418, 1419, 3, 425, 212, 0, 1419, + 1420, 3, 405, 202, 0, 1420, 1421, 3, 407, 203, 0, 1421, 1422, 3, 405, 202, + 0, 1422, 318, 1, 0, 0, 0, 1423, 1424, 3, 403, 201, 0, 1424, 1425, 3, 439, + 219, 0, 1425, 1426, 3, 433, 216, 0, 1426, 1427, 3, 433, 216, 0, 1427, 1428, + 3, 407, 203, 0, 1428, 1429, 3, 425, 212, 0, 1429, 1430, 3, 437, 218, 0, + 1430, 320, 1, 0, 0, 0, 1431, 1432, 3, 409, 204, 0, 1432, 1433, 3, 427, + 213, 0, 1433, 1434, 3, 421, 210, 0, 1434, 1435, 3, 421, 210, 0, 1435, 1436, + 3, 427, 213, 0, 1436, 1437, 3, 443, 221, 0, 1437, 1438, 3, 415, 207, 0, + 1438, 1439, 3, 425, 212, 0, 1439, 1440, 3, 411, 205, 0, 1440, 322, 1, 0, + 0, 0, 1441, 1442, 3, 403, 201, 0, 1442, 1443, 3, 439, 219, 0, 1443, 1444, + 3, 423, 211, 0, 1444, 1445, 3, 407, 203, 0, 1445, 1446, 5, 95, 0, 0, 1446, + 1447, 3, 405, 202, 0, 1447, 1448, 3, 415, 207, 0, 1448, 1449, 3, 435, 217, + 0, 1449, 1450, 3, 437, 218, 0, 1450, 324, 1, 0, 0, 0, 1451, 1452, 3, 405, + 202, 0, 1452, 1453, 3, 407, 203, 0, 1453, 1454, 3, 425, 212, 0, 1454, 1455, + 3, 435, 217, 0, 1455, 1456, 3, 407, 203, 0, 1456, 1457, 5, 95, 0, 0, 1457, + 1458, 3, 433, 216, 0, 1458, 1459, 3, 399, 199, 0, 1459, 1460, 3, 425, 212, + 0, 1460, 1461, 3, 419, 209, 0, 1461, 326, 1, 0, 0, 0, 1462, 1463, 3, 421, + 210, 0, 1463, 1464, 3, 399, 199, 0, 1464, 1465, 3, 411, 205, 0, 1465, 328, + 1, 0, 0, 0, 1466, 1467, 3, 421, 210, 0, 1467, 1468, 3, 399, 199, 0, 1468, + 1469, 3, 435, 217, 0, 1469, 1470, 3, 437, 218, 0, 1470, 1471, 5, 95, 0, + 0, 1471, 1472, 3, 441, 220, 0, 1472, 1473, 3, 399, 199, 0, 1473, 1474, + 3, 421, 210, 0, 1474, 1475, 3, 439, 219, 0, 1475, 1476, 3, 407, 203, 0, + 1476, 330, 1, 0, 0, 0, 1477, 1478, 3, 421, 210, 0, 1478, 1479, 3, 407, + 203, 0, 1479, 1480, 3, 399, 199, 0, 1480, 1481, 3, 405, 202, 0, 1481, 332, + 1, 0, 0, 0, 1482, 1483, 3, 425, 212, 0, 1483, 1484, 3, 437, 218, 0, 1484, + 1485, 3, 413, 206, 0, 1485, 1486, 5, 95, 0, 0, 1486, 1487, 3, 441, 220, + 0, 1487, 1488, 3, 399, 199, 0, 1488, 1489, 3, 421, 210, 0, 1489, 1490, + 3, 439, 219, 0, 1490, 1491, 3, 407, 203, 0, 1491, 334, 1, 0, 0, 0, 1492, + 1493, 3, 425, 212, 0, 1493, 1494, 3, 437, 218, 0, 1494, 1495, 3, 415, 207, + 0, 1495, 1496, 3, 421, 210, 0, 1496, 1497, 3, 407, 203, 0, 1497, 336, 1, + 0, 0, 0, 1498, 1499, 3, 429, 214, 0, 1499, 1500, 3, 407, 203, 0, 1500, + 1501, 3, 433, 216, 0, 1501, 1502, 3, 403, 201, 0, 1502, 1503, 3, 407, 203, + 0, 1503, 1504, 3, 425, 212, 0, 1504, 1505, 3, 437, 218, 0, 1505, 1506, + 5, 95, 0, 0, 1506, 1507, 3, 433, 216, 0, 1507, 1508, 3, 399, 199, 0, 1508, + 1509, 3, 425, 212, 0, 1509, 1510, 3, 419, 209, 0, 1510, 338, 1, 0, 0, 0, + 1511, 1512, 3, 433, 216, 0, 1512, 1513, 3, 399, 199, 0, 1513, 1514, 3, + 425, 212, 0, 1514, 1515, 3, 419, 209, 0, 1515, 340, 1, 0, 0, 0, 1516, 1517, + 3, 433, 216, 0, 1517, 1518, 3, 427, 213, 0, 1518, 1519, 3, 443, 221, 0, + 1519, 1520, 5, 95, 0, 0, 1520, 1521, 3, 425, 212, 0, 1521, 1522, 3, 439, + 219, 0, 1522, 1523, 3, 423, 211, 0, 1523, 1524, 3, 401, 200, 0, 1524, 1525, + 3, 407, 203, 0, 1525, 1526, 3, 433, 216, 0, 1526, 342, 1, 0, 0, 0, 1527, + 1528, 3, 411, 205, 0, 1528, 1529, 3, 407, 203, 0, 1529, 1530, 3, 425, 212, + 0, 1530, 1531, 3, 407, 203, 0, 1531, 1532, 3, 433, 216, 0, 1532, 1533, + 3, 399, 199, 0, 1533, 1534, 3, 437, 218, 0, 1534, 1535, 3, 407, 203, 0, + 1535, 1536, 3, 405, 202, 0, 1536, 344, 1, 0, 0, 0, 1537, 1538, 3, 399, + 199, 0, 1538, 1539, 3, 421, 210, 0, 1539, 1540, 3, 443, 221, 0, 1540, 1541, + 3, 399, 199, 0, 1541, 1542, 3, 447, 223, 0, 1542, 1543, 3, 435, 217, 0, + 1543, 346, 1, 0, 0, 0, 1544, 1545, 3, 435, 217, 0, 1545, 1546, 3, 437, + 218, 0, 1546, 1547, 3, 427, 213, 0, 1547, 1548, 3, 433, 216, 0, 1548, 1549, + 3, 407, 203, 0, 1549, 1550, 3, 405, 202, 0, 1550, 348, 1, 0, 0, 0, 1551, + 1552, 3, 437, 218, 0, 1552, 1553, 3, 433, 216, 0, 1553, 1554, 3, 439, 219, + 0, 1554, 1555, 3, 407, 203, 0, 1555, 350, 1, 0, 0, 0, 1556, 1557, 3, 409, + 204, 0, 1557, 1558, 3, 399, 199, 0, 1558, 1559, 3, 421, 210, 0, 1559, 1560, + 3, 435, 217, 0, 1560, 1561, 3, 407, 203, 0, 1561, 352, 1, 0, 0, 0, 1562, + 1563, 3, 443, 221, 0, 1563, 1564, 3, 415, 207, 0, 1564, 1565, 3, 425, 212, + 0, 1565, 1566, 3, 405, 202, 0, 1566, 1567, 3, 427, 213, 0, 1567, 1568, + 3, 443, 221, 0, 1568, 354, 1, 0, 0, 0, 1569, 1570, 3, 425, 212, 0, 1570, + 1571, 3, 439, 219, 0, 1571, 1572, 3, 421, 210, 0, 1572, 1573, 3, 421, 210, + 0, 1573, 1574, 3, 435, 217, 0, 1574, 356, 1, 0, 0, 0, 1575, 1576, 3, 409, + 204, 0, 1576, 1577, 3, 415, 207, 0, 1577, 1578, 3, 433, 216, 0, 1578, 1579, + 3, 435, 217, 0, 1579, 1580, 3, 437, 218, 0, 1580, 358, 1, 0, 0, 0, 1581, + 1582, 3, 421, 210, 0, 1582, 1583, 3, 399, 199, 0, 1583, 1584, 3, 435, 217, + 0, 1584, 1585, 3, 437, 218, 0, 1585, 360, 1, 0, 0, 0, 1586, 1587, 3, 409, + 204, 0, 1587, 1588, 3, 415, 207, 0, 1588, 1589, 3, 421, 210, 0, 1589, 1590, + 3, 437, 218, 0, 1590, 1591, 3, 407, 203, 0, 1591, 1592, 3, 433, 216, 0, + 1592, 362, 1, 0, 0, 0, 1593, 1594, 3, 411, 205, 0, 1594, 1595, 3, 433, + 216, 0, 1595, 1596, 3, 427, 213, 0, 1596, 1597, 3, 439, 219, 0, 1597, 1598, + 3, 429, 214, 0, 1598, 1599, 3, 435, 217, 0, 1599, 364, 1, 0, 0, 0, 1600, + 1601, 3, 407, 203, 0, 1601, 1602, 3, 445, 222, 0, 1602, 1603, 3, 403, 201, + 0, 1603, 1604, 3, 421, 210, 0, 1604, 1605, 3, 439, 219, 0, 1605, 1606, + 3, 405, 202, 0, 1606, 1607, 3, 407, 203, 0, 1607, 366, 1, 0, 0, 0, 1608, + 1609, 3, 437, 218, 0, 1609, 1610, 3, 415, 207, 0, 1610, 1611, 3, 407, 203, + 0, 1611, 1612, 3, 435, 217, 0, 1612, 368, 1, 0, 0, 0, 1613, 1614, 3, 427, + 213, 0, 1614, 1615, 3, 437, 218, 0, 1615, 1616, 3, 413, 206, 0, 1616, 1617, + 3, 407, 203, 0, 1617, 1618, 3, 433, 216, 0, 1618, 1619, 3, 435, 217, 0, + 1619, 370, 1, 0, 0, 0, 1620, 1621, 3, 405, 202, 0, 1621, 1622, 3, 427, + 213, 0, 1622, 372, 1, 0, 0, 0, 1623, 1624, 3, 425, 212, 0, 1624, 1625, + 3, 427, 213, 0, 1625, 1626, 3, 437, 218, 0, 1626, 1627, 3, 413, 206, 0, + 1627, 1628, 3, 415, 207, 0, 1628, 1629, 3, 425, 212, 0, 1629, 1630, 3, + 411, 205, 0, 1630, 374, 1, 0, 0, 0, 1631, 1637, 5, 34, 0, 0, 1632, 1636, + 8, 0, 0, 0, 1633, 1634, 5, 34, 0, 0, 1634, 1636, 5, 34, 0, 0, 1635, 1632, + 1, 0, 0, 0, 1635, 1633, 1, 0, 0, 0, 1636, 1639, 1, 0, 0, 0, 1637, 1635, + 1, 0, 0, 0, 1637, 1638, 1, 0, 0, 0, 1638, 1640, 1, 0, 0, 0, 1639, 1637, + 1, 0, 0, 0, 1640, 1667, 5, 34, 0, 0, 1641, 1647, 5, 96, 0, 0, 1642, 1646, + 8, 1, 0, 0, 1643, 1644, 5, 96, 0, 0, 1644, 1646, 5, 96, 0, 0, 1645, 1642, + 1, 0, 0, 0, 1645, 1643, 1, 0, 0, 0, 1646, 1649, 1, 0, 0, 0, 1647, 1645, + 1, 0, 0, 0, 1647, 1648, 1, 0, 0, 0, 1648, 1650, 1, 0, 0, 0, 1649, 1647, + 1, 0, 0, 0, 1650, 1667, 5, 96, 0, 0, 1651, 1655, 5, 91, 0, 0, 1652, 1654, + 8, 2, 0, 0, 1653, 1652, 1, 0, 0, 0, 1654, 1657, 1, 0, 0, 0, 1655, 1653, + 1, 0, 0, 0, 1655, 1656, 1, 0, 0, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1655, + 1, 0, 0, 0, 1658, 1667, 5, 93, 0, 0, 1659, 1663, 7, 3, 0, 0, 1660, 1662, + 7, 4, 0, 0, 1661, 1660, 1, 0, 0, 0, 1662, 1665, 1, 0, 0, 0, 1663, 1661, + 1, 0, 0, 0, 1663, 1664, 1, 0, 0, 0, 1664, 1667, 1, 0, 0, 0, 1665, 1663, + 1, 0, 0, 0, 1666, 1631, 1, 0, 0, 0, 1666, 1641, 1, 0, 0, 0, 1666, 1651, + 1, 0, 0, 0, 1666, 1659, 1, 0, 0, 0, 1667, 376, 1, 0, 0, 0, 1668, 1670, + 3, 397, 198, 0, 1669, 1668, 1, 0, 0, 0, 1670, 1671, 1, 0, 0, 0, 1671, 1669, + 1, 0, 0, 0, 1671, 1672, 1, 0, 0, 0, 1672, 1680, 1, 0, 0, 0, 1673, 1677, + 5, 46, 0, 0, 1674, 1676, 3, 397, 198, 0, 1675, 1674, 1, 0, 0, 0, 1676, + 1679, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1677, 1678, 1, 0, 0, 0, 1678, + 1681, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1680, 1673, 1, 0, 0, 0, 1680, + 1681, 1, 0, 0, 0, 1681, 1689, 1, 0, 0, 0, 1682, 1684, 5, 46, 0, 0, 1683, + 1685, 3, 397, 198, 0, 1684, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, + 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1689, 1, 0, 0, 0, 1688, + 1669, 1, 0, 0, 0, 1688, 1682, 1, 0, 0, 0, 1689, 1699, 1, 0, 0, 0, 1690, + 1692, 3, 407, 203, 0, 1691, 1693, 7, 5, 0, 0, 1692, 1691, 1, 0, 0, 0, 1692, + 1693, 1, 0, 0, 0, 1693, 1695, 1, 0, 0, 0, 1694, 1696, 3, 397, 198, 0, 1695, + 1694, 1, 0, 0, 0, 1696, 1697, 1, 0, 0, 0, 1697, 1695, 1, 0, 0, 0, 1697, + 1698, 1, 0, 0, 0, 1698, 1700, 1, 0, 0, 0, 1699, 1690, 1, 0, 0, 0, 1699, + 1700, 1, 0, 0, 0, 1700, 1710, 1, 0, 0, 0, 1701, 1702, 5, 48, 0, 0, 1702, + 1703, 5, 120, 0, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1706, 3, 395, 197, 0, + 1705, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1705, 1, 0, 0, 0, + 1707, 1708, 1, 0, 0, 0, 1708, 1710, 1, 0, 0, 0, 1709, 1688, 1, 0, 0, 0, + 1709, 1701, 1, 0, 0, 0, 1710, 378, 1, 0, 0, 0, 1711, 1715, 5, 63, 0, 0, + 1712, 1714, 3, 397, 198, 0, 1713, 1712, 1, 0, 0, 0, 1714, 1717, 1, 0, 0, + 0, 1715, 1713, 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 380, 1, 0, 0, + 0, 1717, 1715, 1, 0, 0, 0, 1718, 1719, 7, 6, 0, 0, 1719, 1720, 3, 375, + 187, 0, 1720, 382, 1, 0, 0, 0, 1721, 1727, 5, 39, 0, 0, 1722, 1726, 8, + 7, 0, 0, 1723, 1724, 5, 39, 0, 0, 1724, 1726, 5, 39, 0, 0, 1725, 1722, + 1, 0, 0, 0, 1725, 1723, 1, 0, 0, 0, 1726, 1729, 1, 0, 0, 0, 1727, 1725, + 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1730, 1, 0, 0, 0, 1729, 1727, + 1, 0, 0, 0, 1730, 1731, 5, 39, 0, 0, 1731, 384, 1, 0, 0, 0, 1732, 1733, + 3, 445, 222, 0, 1733, 1734, 3, 383, 191, 0, 1734, 386, 1, 0, 0, 0, 1735, + 1736, 5, 45, 0, 0, 1736, 1737, 5, 45, 0, 0, 1737, 1741, 1, 0, 0, 0, 1738, + 1740, 8, 8, 0, 0, 1739, 1738, 1, 0, 0, 0, 1740, 1743, 1, 0, 0, 0, 1741, + 1739, 1, 0, 0, 0, 1741, 1742, 1, 0, 0, 0, 1742, 1749, 1, 0, 0, 0, 1743, + 1741, 1, 0, 0, 0, 1744, 1746, 5, 13, 0, 0, 1745, 1744, 1, 0, 0, 0, 1745, + 1746, 1, 0, 0, 0, 1746, 1747, 1, 0, 0, 0, 1747, 1750, 5, 10, 0, 0, 1748, + 1750, 5, 0, 0, 1, 1749, 1745, 1, 0, 0, 0, 1749, 1748, 1, 0, 0, 0, 1750, + 1751, 1, 0, 0, 0, 1751, 1752, 6, 193, 0, 0, 1752, 388, 1, 0, 0, 0, 1753, + 1754, 5, 47, 0, 0, 1754, 1755, 5, 42, 0, 0, 1755, 1759, 1, 0, 0, 0, 1756, + 1758, 9, 0, 0, 0, 1757, 1756, 1, 0, 0, 0, 1758, 1761, 1, 0, 0, 0, 1759, + 1760, 1, 0, 0, 0, 1759, 1757, 1, 0, 0, 0, 1760, 1762, 1, 0, 0, 0, 1761, + 1759, 1, 0, 0, 0, 1762, 1763, 5, 42, 0, 0, 1763, 1764, 5, 47, 0, 0, 1764, + 1765, 1, 0, 0, 0, 1765, 1766, 6, 194, 0, 0, 1766, 390, 1, 0, 0, 0, 1767, + 1768, 7, 9, 0, 0, 1768, 1769, 1, 0, 0, 0, 1769, 1770, 6, 195, 0, 0, 1770, + 392, 1, 0, 0, 0, 1771, 1772, 9, 0, 0, 0, 1772, 394, 1, 0, 0, 0, 1773, 1774, + 7, 10, 0, 0, 1774, 396, 1, 0, 0, 0, 1775, 1776, 7, 11, 0, 0, 1776, 398, + 1, 0, 0, 0, 1777, 1778, 7, 12, 0, 0, 1778, 400, 1, 0, 0, 0, 1779, 1780, + 7, 13, 0, 0, 1780, 402, 1, 0, 0, 0, 1781, 1782, 7, 14, 0, 0, 1782, 404, + 1, 0, 0, 0, 1783, 1784, 7, 15, 0, 0, 1784, 406, 1, 0, 0, 0, 1785, 1786, + 7, 16, 0, 0, 1786, 408, 1, 0, 0, 0, 1787, 1788, 7, 17, 0, 0, 1788, 410, + 1, 0, 0, 0, 1789, 1790, 7, 18, 0, 0, 1790, 412, 1, 0, 0, 0, 1791, 1792, + 7, 19, 0, 0, 1792, 414, 1, 0, 0, 0, 1793, 1794, 7, 20, 0, 0, 1794, 416, + 1, 0, 0, 0, 1795, 1796, 7, 21, 0, 0, 1796, 418, 1, 0, 0, 0, 1797, 1798, + 7, 22, 0, 0, 1798, 420, 1, 0, 0, 0, 1799, 1800, 7, 23, 0, 0, 1800, 422, + 1, 0, 0, 0, 1801, 1802, 7, 24, 0, 0, 1802, 424, 1, 0, 0, 0, 1803, 1804, + 7, 25, 0, 0, 1804, 426, 1, 0, 0, 0, 1805, 1806, 7, 26, 0, 0, 1806, 428, + 1, 0, 0, 0, 1807, 1808, 7, 27, 0, 0, 1808, 430, 1, 0, 0, 0, 1809, 1810, + 7, 28, 0, 0, 1810, 432, 1, 0, 0, 0, 1811, 1812, 7, 29, 0, 0, 1812, 434, + 1, 0, 0, 0, 1813, 1814, 7, 30, 0, 0, 1814, 436, 1, 0, 0, 0, 1815, 1816, + 7, 31, 0, 0, 1816, 438, 1, 0, 0, 0, 1817, 1818, 7, 32, 0, 0, 1818, 440, + 1, 0, 0, 0, 1819, 1820, 7, 33, 0, 0, 1820, 442, 1, 0, 0, 0, 1821, 1822, + 7, 34, 0, 0, 1822, 444, 1, 0, 0, 0, 1823, 1824, 7, 35, 0, 0, 1824, 446, + 1, 0, 0, 0, 1825, 1826, 7, 36, 0, 0, 1826, 448, 1, 0, 0, 0, 1827, 1828, + 7, 37, 0, 0, 1828, 450, 1, 0, 0, 0, 25, 0, 1635, 1637, 1645, 1647, 1655, + 1663, 1666, 1671, 1677, 1680, 1686, 1688, 1692, 1697, 1699, 1707, 1709, + 1715, 1725, 1727, 1741, 1745, 1749, 1759, 1, 0, 1, 0, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -984,7 +988,7 @@ func sqlitelexerLexerInit() { // NewSQLiteLexer(). You can call this function if you wish to initialize the static state ahead // of time. func SQLiteLexerInit() { - staticData := &sqlitelexerLexerStaticData + staticData := &SQLiteLexerLexerStaticData staticData.once.Do(sqlitelexerLexerInit) } @@ -993,13 +997,13 @@ func NewSQLiteLexer(input antlr.CharStream) *SQLiteLexer { SQLiteLexerInit() l := new(SQLiteLexer) l.BaseLexer = antlr.NewBaseLexer(input) - staticData := &sqlitelexerLexerStaticData - l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.predictionContextCache) - l.channelNames = staticData.channelNames - l.modeNames = staticData.modeNames - l.RuleNames = staticData.ruleNames - l.LiteralNames = staticData.literalNames - l.SymbolicNames = staticData.symbolicNames + staticData := &SQLiteLexerLexerStaticData + l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) + l.channelNames = staticData.ChannelNames + l.modeNames = staticData.ModeNames + l.RuleNames = staticData.RuleNames + l.LiteralNames = staticData.LiteralNames + l.SymbolicNames = staticData.SymbolicNames l.GrammarFileName = "SQLiteLexer.g4" // TODO: l.EOF = antlr.TokenEOF @@ -1016,191 +1020,193 @@ const ( SQLiteLexerASSIGN = 6 SQLiteLexerSTAR = 7 SQLiteLexerPLUS = 8 - SQLiteLexerMINUS = 9 - SQLiteLexerTILDE = 10 - SQLiteLexerPIPE2 = 11 - SQLiteLexerDIV = 12 - SQLiteLexerMOD = 13 - SQLiteLexerLT2 = 14 - SQLiteLexerGT2 = 15 - SQLiteLexerAMP = 16 - SQLiteLexerPIPE = 17 - SQLiteLexerLT = 18 - SQLiteLexerLT_EQ = 19 - SQLiteLexerGT = 20 - SQLiteLexerGT_EQ = 21 - SQLiteLexerEQ = 22 - SQLiteLexerNOT_EQ1 = 23 - SQLiteLexerNOT_EQ2 = 24 - SQLiteLexerABORT_ = 25 - SQLiteLexerACTION_ = 26 - SQLiteLexerADD_ = 27 - SQLiteLexerAFTER_ = 28 - SQLiteLexerALL_ = 29 - SQLiteLexerALTER_ = 30 - SQLiteLexerANALYZE_ = 31 - SQLiteLexerAND_ = 32 - SQLiteLexerAS_ = 33 - SQLiteLexerASC_ = 34 - SQLiteLexerATTACH_ = 35 - SQLiteLexerAUTOINCREMENT_ = 36 - SQLiteLexerBEFORE_ = 37 - SQLiteLexerBEGIN_ = 38 - SQLiteLexerBETWEEN_ = 39 - SQLiteLexerBY_ = 40 - SQLiteLexerCASCADE_ = 41 - SQLiteLexerCASE_ = 42 - SQLiteLexerCAST_ = 43 - SQLiteLexerCHECK_ = 44 - SQLiteLexerCOLLATE_ = 45 - SQLiteLexerCOLUMN_ = 46 - SQLiteLexerCOMMIT_ = 47 - SQLiteLexerCONFLICT_ = 48 - SQLiteLexerCONSTRAINT_ = 49 - SQLiteLexerCREATE_ = 50 - SQLiteLexerCROSS_ = 51 - SQLiteLexerCURRENT_DATE_ = 52 - SQLiteLexerCURRENT_TIME_ = 53 - SQLiteLexerCURRENT_TIMESTAMP_ = 54 - SQLiteLexerDATABASE_ = 55 - SQLiteLexerDEFAULT_ = 56 - SQLiteLexerDEFERRABLE_ = 57 - SQLiteLexerDEFERRED_ = 58 - SQLiteLexerDELETE_ = 59 - SQLiteLexerDESC_ = 60 - SQLiteLexerDETACH_ = 61 - SQLiteLexerDISTINCT_ = 62 - SQLiteLexerDROP_ = 63 - SQLiteLexerEACH_ = 64 - SQLiteLexerELSE_ = 65 - SQLiteLexerEND_ = 66 - SQLiteLexerESCAPE_ = 67 - SQLiteLexerEXCEPT_ = 68 - SQLiteLexerEXCLUSIVE_ = 69 - SQLiteLexerEXISTS_ = 70 - SQLiteLexerEXPLAIN_ = 71 - SQLiteLexerFAIL_ = 72 - SQLiteLexerFOR_ = 73 - SQLiteLexerFOREIGN_ = 74 - SQLiteLexerFROM_ = 75 - SQLiteLexerFULL_ = 76 - SQLiteLexerGLOB_ = 77 - SQLiteLexerGROUP_ = 78 - SQLiteLexerHAVING_ = 79 - SQLiteLexerIF_ = 80 - SQLiteLexerIGNORE_ = 81 - SQLiteLexerIMMEDIATE_ = 82 - SQLiteLexerIN_ = 83 - SQLiteLexerINDEX_ = 84 - SQLiteLexerINDEXED_ = 85 - SQLiteLexerINITIALLY_ = 86 - SQLiteLexerINNER_ = 87 - SQLiteLexerINSERT_ = 88 - SQLiteLexerINSTEAD_ = 89 - SQLiteLexerINTERSECT_ = 90 - SQLiteLexerINTO_ = 91 - SQLiteLexerIS_ = 92 - SQLiteLexerISNULL_ = 93 - SQLiteLexerJOIN_ = 94 - SQLiteLexerKEY_ = 95 - SQLiteLexerLEFT_ = 96 - SQLiteLexerLIKE_ = 97 - SQLiteLexerLIMIT_ = 98 - SQLiteLexerMATCH_ = 99 - SQLiteLexerNATURAL_ = 100 - SQLiteLexerNO_ = 101 - SQLiteLexerNOT_ = 102 - SQLiteLexerNOTNULL_ = 103 - SQLiteLexerNULL_ = 104 - SQLiteLexerOF_ = 105 - SQLiteLexerOFFSET_ = 106 - SQLiteLexerON_ = 107 - SQLiteLexerOR_ = 108 - SQLiteLexerORDER_ = 109 - SQLiteLexerOUTER_ = 110 - SQLiteLexerPLAN_ = 111 - SQLiteLexerPRAGMA_ = 112 - SQLiteLexerPRIMARY_ = 113 - SQLiteLexerQUERY_ = 114 - SQLiteLexerRAISE_ = 115 - SQLiteLexerRECURSIVE_ = 116 - SQLiteLexerREFERENCES_ = 117 - SQLiteLexerREGEXP_ = 118 - SQLiteLexerREINDEX_ = 119 - SQLiteLexerRELEASE_ = 120 - SQLiteLexerRENAME_ = 121 - SQLiteLexerREPLACE_ = 122 - SQLiteLexerRESTRICT_ = 123 - SQLiteLexerRETURNING_ = 124 - SQLiteLexerRIGHT_ = 125 - SQLiteLexerROLLBACK_ = 126 - SQLiteLexerROW_ = 127 - SQLiteLexerROWS_ = 128 - SQLiteLexerSAVEPOINT_ = 129 - SQLiteLexerSELECT_ = 130 - SQLiteLexerSET_ = 131 - SQLiteLexerSTRICT_ = 132 - SQLiteLexerTABLE_ = 133 - SQLiteLexerTEMP_ = 134 - SQLiteLexerTEMPORARY_ = 135 - SQLiteLexerTHEN_ = 136 - SQLiteLexerTO_ = 137 - SQLiteLexerTRANSACTION_ = 138 - SQLiteLexerTRIGGER_ = 139 - SQLiteLexerUNION_ = 140 - SQLiteLexerUNIQUE_ = 141 - SQLiteLexerUPDATE_ = 142 - SQLiteLexerUSING_ = 143 - SQLiteLexerVACUUM_ = 144 - SQLiteLexerVALUES_ = 145 - SQLiteLexerVIEW_ = 146 - SQLiteLexerVIRTUAL_ = 147 - SQLiteLexerWHEN_ = 148 - SQLiteLexerWHERE_ = 149 - SQLiteLexerWITH_ = 150 - SQLiteLexerWITHOUT_ = 151 - SQLiteLexerFIRST_VALUE_ = 152 - SQLiteLexerOVER_ = 153 - SQLiteLexerPARTITION_ = 154 - SQLiteLexerRANGE_ = 155 - SQLiteLexerPRECEDING_ = 156 - SQLiteLexerUNBOUNDED_ = 157 - SQLiteLexerCURRENT_ = 158 - SQLiteLexerFOLLOWING_ = 159 - SQLiteLexerCUME_DIST_ = 160 - SQLiteLexerDENSE_RANK_ = 161 - SQLiteLexerLAG_ = 162 - SQLiteLexerLAST_VALUE_ = 163 - SQLiteLexerLEAD_ = 164 - SQLiteLexerNTH_VALUE_ = 165 - SQLiteLexerNTILE_ = 166 - SQLiteLexerPERCENT_RANK_ = 167 - SQLiteLexerRANK_ = 168 - SQLiteLexerROW_NUMBER_ = 169 - SQLiteLexerGENERATED_ = 170 - SQLiteLexerALWAYS_ = 171 - SQLiteLexerSTORED_ = 172 - SQLiteLexerTRUE_ = 173 - SQLiteLexerFALSE_ = 174 - SQLiteLexerWINDOW_ = 175 - SQLiteLexerNULLS_ = 176 - SQLiteLexerFIRST_ = 177 - SQLiteLexerLAST_ = 178 - SQLiteLexerFILTER_ = 179 - SQLiteLexerGROUPS_ = 180 - SQLiteLexerEXCLUDE_ = 181 - SQLiteLexerTIES_ = 182 - SQLiteLexerOTHERS_ = 183 - SQLiteLexerDO_ = 184 - SQLiteLexerNOTHING_ = 185 - SQLiteLexerIDENTIFIER = 186 - SQLiteLexerNUMERIC_LITERAL = 187 - SQLiteLexerNUMBERED_BIND_PARAMETER = 188 - SQLiteLexerNAMED_BIND_PARAMETER = 189 - SQLiteLexerSTRING_LITERAL = 190 - SQLiteLexerBLOB_LITERAL = 191 - SQLiteLexerSINGLE_LINE_COMMENT = 192 - SQLiteLexerMULTILINE_COMMENT = 193 - SQLiteLexerSPACES = 194 - SQLiteLexerUNEXPECTED_CHAR = 195 + SQLiteLexerPTR2 = 9 + SQLiteLexerPTR = 10 + SQLiteLexerMINUS = 11 + SQLiteLexerTILDE = 12 + SQLiteLexerPIPE2 = 13 + SQLiteLexerDIV = 14 + SQLiteLexerMOD = 15 + SQLiteLexerLT2 = 16 + SQLiteLexerGT2 = 17 + SQLiteLexerAMP = 18 + SQLiteLexerPIPE = 19 + SQLiteLexerLT = 20 + SQLiteLexerLT_EQ = 21 + SQLiteLexerGT = 22 + SQLiteLexerGT_EQ = 23 + SQLiteLexerEQ = 24 + SQLiteLexerNOT_EQ1 = 25 + SQLiteLexerNOT_EQ2 = 26 + SQLiteLexerABORT_ = 27 + SQLiteLexerACTION_ = 28 + SQLiteLexerADD_ = 29 + SQLiteLexerAFTER_ = 30 + SQLiteLexerALL_ = 31 + SQLiteLexerALTER_ = 32 + SQLiteLexerANALYZE_ = 33 + SQLiteLexerAND_ = 34 + SQLiteLexerAS_ = 35 + SQLiteLexerASC_ = 36 + SQLiteLexerATTACH_ = 37 + SQLiteLexerAUTOINCREMENT_ = 38 + SQLiteLexerBEFORE_ = 39 + SQLiteLexerBEGIN_ = 40 + SQLiteLexerBETWEEN_ = 41 + SQLiteLexerBY_ = 42 + SQLiteLexerCASCADE_ = 43 + SQLiteLexerCASE_ = 44 + SQLiteLexerCAST_ = 45 + SQLiteLexerCHECK_ = 46 + SQLiteLexerCOLLATE_ = 47 + SQLiteLexerCOLUMN_ = 48 + SQLiteLexerCOMMIT_ = 49 + SQLiteLexerCONFLICT_ = 50 + SQLiteLexerCONSTRAINT_ = 51 + SQLiteLexerCREATE_ = 52 + SQLiteLexerCROSS_ = 53 + SQLiteLexerCURRENT_DATE_ = 54 + SQLiteLexerCURRENT_TIME_ = 55 + SQLiteLexerCURRENT_TIMESTAMP_ = 56 + SQLiteLexerDATABASE_ = 57 + SQLiteLexerDEFAULT_ = 58 + SQLiteLexerDEFERRABLE_ = 59 + SQLiteLexerDEFERRED_ = 60 + SQLiteLexerDELETE_ = 61 + SQLiteLexerDESC_ = 62 + SQLiteLexerDETACH_ = 63 + SQLiteLexerDISTINCT_ = 64 + SQLiteLexerDROP_ = 65 + SQLiteLexerEACH_ = 66 + SQLiteLexerELSE_ = 67 + SQLiteLexerEND_ = 68 + SQLiteLexerESCAPE_ = 69 + SQLiteLexerEXCEPT_ = 70 + SQLiteLexerEXCLUSIVE_ = 71 + SQLiteLexerEXISTS_ = 72 + SQLiteLexerEXPLAIN_ = 73 + SQLiteLexerFAIL_ = 74 + SQLiteLexerFOR_ = 75 + SQLiteLexerFOREIGN_ = 76 + SQLiteLexerFROM_ = 77 + SQLiteLexerFULL_ = 78 + SQLiteLexerGLOB_ = 79 + SQLiteLexerGROUP_ = 80 + SQLiteLexerHAVING_ = 81 + SQLiteLexerIF_ = 82 + SQLiteLexerIGNORE_ = 83 + SQLiteLexerIMMEDIATE_ = 84 + SQLiteLexerIN_ = 85 + SQLiteLexerINDEX_ = 86 + SQLiteLexerINDEXED_ = 87 + SQLiteLexerINITIALLY_ = 88 + SQLiteLexerINNER_ = 89 + SQLiteLexerINSERT_ = 90 + SQLiteLexerINSTEAD_ = 91 + SQLiteLexerINTERSECT_ = 92 + SQLiteLexerINTO_ = 93 + SQLiteLexerIS_ = 94 + SQLiteLexerISNULL_ = 95 + SQLiteLexerJOIN_ = 96 + SQLiteLexerKEY_ = 97 + SQLiteLexerLEFT_ = 98 + SQLiteLexerLIKE_ = 99 + SQLiteLexerLIMIT_ = 100 + SQLiteLexerMATCH_ = 101 + SQLiteLexerNATURAL_ = 102 + SQLiteLexerNO_ = 103 + SQLiteLexerNOT_ = 104 + SQLiteLexerNOTNULL_ = 105 + SQLiteLexerNULL_ = 106 + SQLiteLexerOF_ = 107 + SQLiteLexerOFFSET_ = 108 + SQLiteLexerON_ = 109 + SQLiteLexerOR_ = 110 + SQLiteLexerORDER_ = 111 + SQLiteLexerOUTER_ = 112 + SQLiteLexerPLAN_ = 113 + SQLiteLexerPRAGMA_ = 114 + SQLiteLexerPRIMARY_ = 115 + SQLiteLexerQUERY_ = 116 + SQLiteLexerRAISE_ = 117 + SQLiteLexerRECURSIVE_ = 118 + SQLiteLexerREFERENCES_ = 119 + SQLiteLexerREGEXP_ = 120 + SQLiteLexerREINDEX_ = 121 + SQLiteLexerRELEASE_ = 122 + SQLiteLexerRENAME_ = 123 + SQLiteLexerREPLACE_ = 124 + SQLiteLexerRESTRICT_ = 125 + SQLiteLexerRETURNING_ = 126 + SQLiteLexerRIGHT_ = 127 + SQLiteLexerROLLBACK_ = 128 + SQLiteLexerROW_ = 129 + SQLiteLexerROWS_ = 130 + SQLiteLexerSAVEPOINT_ = 131 + SQLiteLexerSELECT_ = 132 + SQLiteLexerSET_ = 133 + SQLiteLexerSTRICT_ = 134 + SQLiteLexerTABLE_ = 135 + SQLiteLexerTEMP_ = 136 + SQLiteLexerTEMPORARY_ = 137 + SQLiteLexerTHEN_ = 138 + SQLiteLexerTO_ = 139 + SQLiteLexerTRANSACTION_ = 140 + SQLiteLexerTRIGGER_ = 141 + SQLiteLexerUNION_ = 142 + SQLiteLexerUNIQUE_ = 143 + SQLiteLexerUPDATE_ = 144 + SQLiteLexerUSING_ = 145 + SQLiteLexerVACUUM_ = 146 + SQLiteLexerVALUES_ = 147 + SQLiteLexerVIEW_ = 148 + SQLiteLexerVIRTUAL_ = 149 + SQLiteLexerWHEN_ = 150 + SQLiteLexerWHERE_ = 151 + SQLiteLexerWITH_ = 152 + SQLiteLexerWITHOUT_ = 153 + SQLiteLexerFIRST_VALUE_ = 154 + SQLiteLexerOVER_ = 155 + SQLiteLexerPARTITION_ = 156 + SQLiteLexerRANGE_ = 157 + SQLiteLexerPRECEDING_ = 158 + SQLiteLexerUNBOUNDED_ = 159 + SQLiteLexerCURRENT_ = 160 + SQLiteLexerFOLLOWING_ = 161 + SQLiteLexerCUME_DIST_ = 162 + SQLiteLexerDENSE_RANK_ = 163 + SQLiteLexerLAG_ = 164 + SQLiteLexerLAST_VALUE_ = 165 + SQLiteLexerLEAD_ = 166 + SQLiteLexerNTH_VALUE_ = 167 + SQLiteLexerNTILE_ = 168 + SQLiteLexerPERCENT_RANK_ = 169 + SQLiteLexerRANK_ = 170 + SQLiteLexerROW_NUMBER_ = 171 + SQLiteLexerGENERATED_ = 172 + SQLiteLexerALWAYS_ = 173 + SQLiteLexerSTORED_ = 174 + SQLiteLexerTRUE_ = 175 + SQLiteLexerFALSE_ = 176 + SQLiteLexerWINDOW_ = 177 + SQLiteLexerNULLS_ = 178 + SQLiteLexerFIRST_ = 179 + SQLiteLexerLAST_ = 180 + SQLiteLexerFILTER_ = 181 + SQLiteLexerGROUPS_ = 182 + SQLiteLexerEXCLUDE_ = 183 + SQLiteLexerTIES_ = 184 + SQLiteLexerOTHERS_ = 185 + SQLiteLexerDO_ = 186 + SQLiteLexerNOTHING_ = 187 + SQLiteLexerIDENTIFIER = 188 + SQLiteLexerNUMERIC_LITERAL = 189 + SQLiteLexerNUMBERED_BIND_PARAMETER = 190 + SQLiteLexerNAMED_BIND_PARAMETER = 191 + SQLiteLexerSTRING_LITERAL = 192 + SQLiteLexerBLOB_LITERAL = 193 + SQLiteLexerSINGLE_LINE_COMMENT = 194 + SQLiteLexerMULTILINE_COMMENT = 195 + SQLiteLexerSPACES = 196 + SQLiteLexerUNEXPECTED_CHAR = 197 ) diff --git a/internal/engine/sqlite/parser/sqlite_parser.go b/internal/engine/sqlite/parser/sqlite_parser.go index 2ee498f565..dba28c22e4 100644 --- a/internal/engine/sqlite/parser/sqlite_parser.go +++ b/internal/engine/sqlite/parser/sqlite_parser.go @@ -1,4 +1,4 @@ -// Code generated from SQLiteParser.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser // SQLiteParser @@ -7,7 +7,7 @@ import ( "strconv" "sync" - "github.com/antlr/antlr4/runtime/Go/antlr/v4" + "github.com/antlr4-go/antlr/v4" ) // Suppress unused import errors @@ -19,57 +19,57 @@ type SQLiteParser struct { *antlr.BaseParser } -var sqliteparserParserStaticData struct { +var SQLiteParserParserStaticData struct { once sync.Once serializedATN []int32 - literalNames []string - symbolicNames []string - ruleNames []string - predictionContextCache *antlr.PredictionContextCache + LiteralNames []string + SymbolicNames []string + RuleNames []string + PredictionContextCache *antlr.PredictionContextCache atn *antlr.ATN decisionToDFA []*antlr.DFA } func sqliteparserParserInit() { - staticData := &sqliteparserParserStaticData - staticData.literalNames = []string{ - "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'-'", "'~'", - "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", "'<'", "'<='", "'>'", - "'>='", "'=='", "'!='", "'<>'", + staticData := &SQLiteParserParserStaticData + staticData.LiteralNames = []string{ + "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'", + "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", + "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'", } - staticData.symbolicNames = []string{ + staticData.SymbolicNames = []string{ "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", - "PLUS", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", "AMP", - "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", "NOT_EQ2", "ABORT_", - "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", "AND_", "AS_", - "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", "BEGIN_", "BETWEEN_", - "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", "COLLATE_", "COLUMN_", - "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", "CROSS_", "CURRENT_DATE_", - "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", "DEFAULT_", "DEFERRABLE_", - "DEFERRED_", "DELETE_", "DESC_", "DETACH_", "DISTINCT_", "DROP_", "EACH_", - "ELSE_", "END_", "ESCAPE_", "EXCEPT_", "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", - "FAIL_", "FOR_", "FOREIGN_", "FROM_", "FULL_", "GLOB_", "GROUP_", "HAVING_", - "IF_", "IGNORE_", "IMMEDIATE_", "IN_", "INDEX_", "INDEXED_", "INITIALLY_", - "INNER_", "INSERT_", "INSTEAD_", "INTERSECT_", "INTO_", "IS_", "ISNULL_", - "JOIN_", "KEY_", "LEFT_", "LIKE_", "LIMIT_", "MATCH_", "NATURAL_", "NO_", - "NOT_", "NOTNULL_", "NULL_", "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", - "OUTER_", "PLAN_", "PRAGMA_", "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", - "REFERENCES_", "REGEXP_", "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", - "RESTRICT_", "RETURNING_", "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", - "SELECT_", "SET_", "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", - "TO_", "TRANSACTION_", "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", - "VACUUM_", "VALUES_", "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", - "WITHOUT_", "FIRST_VALUE_", "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", - "UNBOUNDED_", "CURRENT_", "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", - "LAG_", "LAST_VALUE_", "LEAD_", "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", - "RANK_", "ROW_NUMBER_", "GENERATED_", "ALWAYS_", "STORED_", "TRUE_", - "FALSE_", "WINDOW_", "NULLS_", "FIRST_", "LAST_", "FILTER_", "GROUPS_", - "EXCLUDE_", "TIES_", "OTHERS_", "DO_", "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", - "NUMBERED_BIND_PARAMETER", "NAMED_BIND_PARAMETER", "STRING_LITERAL", - "BLOB_LITERAL", "SINGLE_LINE_COMMENT", "MULTILINE_COMMENT", "SPACES", - "UNEXPECTED_CHAR", - } - staticData.ruleNames = []string{ + "PLUS", "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", + "GT2", "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", + "NOT_EQ2", "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", + "ANALYZE_", "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", + "BEGIN_", "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", + "COLLATE_", "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", + "CROSS_", "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", + "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_", + "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_", + "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_", + "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_", + "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_", + "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_", + "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_", + "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_", + "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_", + "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_", + "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_", + "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_", + "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_", + "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_", + "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_", + "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_", + "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_", + "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_", + "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_", + "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER", + "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT", + "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR", + } + staticData.RuleNames = []string{ "parse", "sql_stmt_list", "sql_stmt", "alter_table_stmt", "analyze_stmt", "attach_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "savepoint_stmt", "release_stmt", "create_index_stmt", "indexed_column", "table_option", @@ -98,9 +98,9 @@ func sqliteparserParserInit() { "window_name", "alias", "filename", "base_window_name", "simple_func", "aggregate_func", "table_function_name", "any_name", } - staticData.predictionContextCache = antlr.NewPredictionContextCache() + staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 195, 2175, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, + 4, 1, 197, 2176, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, @@ -209,137 +209,137 @@ func sqliteparserParserInit() { 12, 34, 996, 1, 34, 1, 34, 3, 34, 1001, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1006, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1032, 8, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 34, 3, 34, 1039, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1050, 8, 34, 1, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1059, 8, 34, 1, 34, 1, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 5, 34, 1067, 8, 34, 10, 34, 12, 34, 1070, 9, 34, 3, 34, - 1072, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1078, 8, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 3, 34, 1084, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, - 5, 34, 1091, 8, 34, 10, 34, 12, 34, 1094, 9, 34, 3, 34, 1096, 8, 34, 1, - 34, 1, 34, 3, 34, 1100, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, - 1107, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1113, 8, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 3, 34, 1120, 8, 34, 5, 34, 1122, 8, 34, 10, 34, - 12, 34, 1125, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 1133, - 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3, 37, 1140, 8, 37, 1, 37, 1, - 37, 1, 37, 1, 37, 1, 37, 3, 37, 1147, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, - 3, 37, 1153, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1158, 8, 37, 1, 37, 1, - 37, 1, 37, 1, 37, 5, 37, 1164, 8, 37, 10, 37, 12, 37, 1167, 9, 37, 1, 37, - 1, 37, 3, 37, 1171, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1178, - 8, 37, 10, 37, 12, 37, 1181, 9, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, - 1, 37, 5, 37, 1189, 8, 37, 10, 37, 12, 37, 1192, 9, 37, 1, 37, 1, 37, 5, - 37, 1196, 8, 37, 10, 37, 12, 37, 1199, 9, 37, 1, 37, 3, 37, 1202, 8, 37, - 1, 37, 3, 37, 1205, 8, 37, 1, 37, 3, 37, 1208, 8, 37, 1, 37, 1, 37, 3, - 37, 1212, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1220, - 8, 38, 10, 38, 12, 38, 1223, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1228, 8, - 38, 3, 38, 1230, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, - 1238, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1245, 8, 38, 1, - 38, 1, 38, 1, 38, 5, 38, 1250, 8, 38, 10, 38, 12, 38, 1253, 9, 38, 1, 38, - 1, 38, 3, 38, 1257, 8, 38, 3, 38, 1259, 8, 38, 1, 39, 1, 39, 1, 39, 1, - 39, 3, 39, 1265, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, - 3, 39, 1274, 8, 39, 1, 40, 1, 40, 1, 40, 3, 40, 1279, 8, 40, 1, 41, 1, - 41, 1, 41, 1, 41, 1, 41, 3, 41, 1286, 8, 41, 1, 41, 1, 41, 3, 41, 1290, - 8, 41, 3, 41, 1292, 8, 41, 1, 42, 3, 42, 1295, 8, 42, 1, 42, 1, 42, 1, - 42, 1, 42, 5, 42, 1301, 8, 42, 10, 42, 12, 42, 1304, 9, 42, 1, 42, 3, 42, - 1307, 8, 42, 1, 42, 3, 42, 1310, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, - 43, 5, 43, 1317, 8, 43, 10, 43, 12, 43, 1320, 9, 43, 1, 44, 1, 44, 3, 44, - 1324, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1329, 8, 44, 10, 44, 12, 44, 1332, - 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1338, 8, 44, 10, 44, 12, 44, - 1341, 9, 44, 1, 44, 3, 44, 1344, 8, 44, 3, 44, 1346, 8, 44, 1, 44, 1, 44, - 3, 44, 1350, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1357, 8, - 44, 10, 44, 12, 44, 1360, 9, 44, 1, 44, 1, 44, 3, 44, 1364, 8, 44, 3, 44, - 1366, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, - 44, 5, 44, 1377, 8, 44, 10, 44, 12, 44, 1380, 9, 44, 3, 44, 1382, 8, 44, - 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1389, 8, 44, 10, 44, 12, 44, - 1392, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1400, 8, - 44, 10, 44, 12, 44, 1403, 9, 44, 1, 44, 1, 44, 5, 44, 1407, 8, 44, 10, - 44, 12, 44, 1410, 9, 44, 3, 44, 1412, 8, 44, 1, 45, 1, 45, 1, 46, 3, 46, - 1417, 8, 46, 1, 46, 1, 46, 3, 46, 1421, 8, 46, 1, 46, 3, 46, 1424, 8, 46, - 1, 47, 3, 47, 1427, 8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1432, 8, 47, 1, - 47, 1, 47, 3, 47, 1436, 8, 47, 1, 47, 4, 47, 1439, 8, 47, 11, 47, 12, 47, - 1440, 1, 47, 3, 47, 1444, 8, 47, 1, 47, 3, 47, 1447, 8, 47, 1, 48, 1, 48, - 1, 48, 3, 48, 1452, 8, 48, 1, 48, 1, 48, 3, 48, 1456, 8, 48, 1, 48, 3, - 48, 1459, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1466, 8, 48, - 1, 48, 1, 48, 1, 48, 3, 48, 1471, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, - 48, 5, 48, 1478, 8, 48, 10, 48, 12, 48, 1481, 9, 48, 1, 48, 1, 48, 3, 48, - 1485, 8, 48, 1, 48, 3, 48, 1488, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, - 48, 1494, 8, 48, 10, 48, 12, 48, 1497, 9, 48, 1, 48, 3, 48, 1500, 8, 48, - 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1508, 8, 48, 1, 48, 3, - 48, 1511, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1516, 8, 48, 1, 48, 1, 48, - 3, 48, 1520, 8, 48, 1, 48, 3, 48, 1523, 8, 48, 1, 48, 1, 48, 1, 48, 1, - 48, 1, 48, 3, 48, 1530, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1535, 8, 48, - 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1542, 8, 48, 10, 48, 12, 48, - 1545, 9, 48, 1, 48, 1, 48, 3, 48, 1549, 8, 48, 1, 48, 3, 48, 1552, 8, 48, - 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1558, 8, 48, 10, 48, 12, 48, 1561, 9, - 48, 1, 48, 3, 48, 1564, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, - 3, 48, 1572, 8, 48, 1, 48, 3, 48, 1575, 8, 48, 3, 48, 1577, 8, 48, 1, 49, - 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1586, 8, 49, 1, 49, 3, - 49, 1589, 8, 49, 3, 49, 1591, 8, 49, 1, 50, 1, 50, 3, 50, 1595, 8, 50, - 1, 50, 1, 50, 3, 50, 1599, 8, 50, 1, 50, 3, 50, 1602, 8, 50, 1, 50, 1, - 50, 1, 50, 3, 50, 1607, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, - 1, 51, 5, 51, 1616, 8, 51, 10, 51, 12, 51, 1619, 9, 51, 1, 51, 1, 51, 3, - 51, 1623, 8, 51, 1, 52, 1, 52, 3, 52, 1627, 8, 52, 1, 52, 1, 52, 3, 52, - 1631, 8, 52, 1, 53, 3, 53, 1634, 8, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1639, - 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1645, 8, 53, 1, 53, 1, 53, 1, - 53, 1, 53, 1, 53, 3, 53, 1652, 8, 53, 1, 53, 1, 53, 1, 53, 5, 53, 1657, - 8, 53, 10, 53, 12, 53, 1660, 9, 53, 1, 53, 1, 53, 3, 53, 1664, 8, 53, 1, - 53, 3, 53, 1667, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1673, 8, 54, - 10, 54, 12, 54, 1676, 9, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1681, 8, 55, 1, - 55, 1, 55, 1, 55, 3, 55, 1686, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, - 1692, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1699, 8, 55, 1, - 55, 1, 55, 1, 55, 5, 55, 1704, 8, 55, 10, 55, 12, 55, 1707, 9, 55, 1, 55, - 1, 55, 3, 55, 1711, 8, 55, 1, 55, 3, 55, 1714, 8, 55, 1, 55, 3, 55, 1717, - 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1722, 8, 56, 1, 56, 1, 56, 1, 56, 3, - 56, 1727, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1734, 8, 56, - 1, 57, 1, 57, 3, 57, 1738, 8, 57, 1, 57, 1, 57, 3, 57, 1742, 8, 57, 1, - 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 3, 59, 1752, 8, 59, - 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1759, 8, 59, 10, 59, 12, 59, - 1762, 9, 59, 3, 59, 1764, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, - 59, 1771, 8, 59, 10, 59, 12, 59, 1774, 9, 59, 1, 59, 3, 59, 1777, 8, 59, - 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1785, 8, 60, 1, 60, 1, - 60, 1, 60, 1, 60, 1, 60, 5, 60, 1792, 8, 60, 10, 60, 12, 60, 1795, 9, 60, - 3, 60, 1797, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1804, 8, - 60, 10, 60, 12, 60, 1807, 9, 60, 3, 60, 1809, 8, 60, 1, 60, 3, 60, 1812, - 8, 60, 1, 60, 3, 60, 1815, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, - 61, 1, 61, 1, 61, 3, 61, 1825, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, - 1, 62, 1, 62, 3, 62, 1834, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, - 63, 1841, 8, 63, 10, 63, 12, 63, 1844, 9, 63, 1, 63, 3, 63, 1847, 8, 63, - 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 3, 64, 1854, 8, 64, 1, 64, 1, 64, 1, - 64, 5, 64, 1859, 8, 64, 10, 64, 12, 64, 1862, 9, 64, 1, 64, 3, 64, 1865, - 8, 64, 1, 64, 1, 64, 3, 64, 1869, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, - 65, 5, 65, 1876, 8, 65, 10, 65, 12, 65, 1879, 9, 65, 1, 65, 3, 65, 1882, - 8, 65, 1, 65, 1, 65, 3, 65, 1886, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1891, - 8, 65, 1, 66, 1, 66, 3, 66, 1895, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1900, - 8, 66, 10, 66, 12, 66, 1903, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, - 5, 67, 1910, 8, 67, 10, 67, 12, 67, 1913, 9, 67, 1, 68, 1, 68, 1, 68, 1, - 68, 3, 68, 1919, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1924, 8, 69, 1, 69, - 3, 69, 1927, 8, 69, 1, 69, 1, 69, 3, 69, 1931, 8, 69, 1, 70, 1, 70, 1, + 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1035, + 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1042, 8, 34, 1, 34, 1, + 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1053, 8, 34, + 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1062, 8, 34, 1, + 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1070, 8, 34, 10, 34, 12, + 34, 1073, 9, 34, 3, 34, 1075, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, + 1081, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1087, 8, 34, 1, 34, 1, + 34, 1, 34, 1, 34, 1, 34, 5, 34, 1094, 8, 34, 10, 34, 12, 34, 1097, 9, 34, + 3, 34, 1099, 8, 34, 1, 34, 1, 34, 3, 34, 1103, 8, 34, 1, 34, 1, 34, 1, + 34, 1, 34, 1, 34, 3, 34, 1110, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, + 1116, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1123, 8, 34, 5, + 34, 1125, 8, 34, 10, 34, 12, 34, 1128, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35, + 1, 35, 1, 35, 3, 35, 1136, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3, + 37, 1143, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1150, 8, 37, + 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1156, 8, 37, 1, 37, 1, 37, 1, 37, 3, + 37, 1161, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1167, 8, 37, 10, 37, + 12, 37, 1170, 9, 37, 1, 37, 1, 37, 3, 37, 1174, 8, 37, 1, 37, 1, 37, 1, + 37, 1, 37, 1, 37, 5, 37, 1181, 8, 37, 10, 37, 12, 37, 1184, 9, 37, 1, 37, + 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1192, 8, 37, 10, 37, 12, 37, + 1195, 9, 37, 1, 37, 1, 37, 5, 37, 1199, 8, 37, 10, 37, 12, 37, 1202, 9, + 37, 1, 37, 1, 37, 1, 37, 3, 37, 1207, 8, 37, 1, 37, 3, 37, 1210, 8, 37, + 1, 37, 3, 37, 1213, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, + 38, 1221, 8, 38, 10, 38, 12, 38, 1224, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, + 1229, 8, 38, 3, 38, 1231, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, + 38, 3, 38, 1239, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1246, + 8, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1251, 8, 38, 10, 38, 12, 38, 1254, 9, + 38, 1, 38, 1, 38, 3, 38, 1258, 8, 38, 3, 38, 1260, 8, 38, 1, 39, 1, 39, + 1, 39, 1, 39, 3, 39, 1266, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, + 39, 1, 39, 3, 39, 1275, 8, 39, 1, 40, 1, 40, 1, 40, 3, 40, 1280, 8, 40, + 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1287, 8, 41, 1, 41, 1, 41, 3, + 41, 1291, 8, 41, 3, 41, 1293, 8, 41, 1, 42, 3, 42, 1296, 8, 42, 1, 42, + 1, 42, 1, 42, 1, 42, 5, 42, 1302, 8, 42, 10, 42, 12, 42, 1305, 9, 42, 1, + 42, 3, 42, 1308, 8, 42, 1, 42, 3, 42, 1311, 8, 42, 1, 43, 1, 43, 1, 43, + 1, 43, 1, 43, 5, 43, 1318, 8, 43, 10, 43, 12, 43, 1321, 9, 43, 1, 44, 1, + 44, 3, 44, 1325, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1330, 8, 44, 10, 44, + 12, 44, 1333, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1339, 8, 44, 10, + 44, 12, 44, 1342, 9, 44, 1, 44, 3, 44, 1345, 8, 44, 3, 44, 1347, 8, 44, + 1, 44, 1, 44, 3, 44, 1351, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, + 44, 1358, 8, 44, 10, 44, 12, 44, 1361, 9, 44, 1, 44, 1, 44, 3, 44, 1365, + 8, 44, 3, 44, 1367, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, + 44, 1, 44, 1, 44, 5, 44, 1378, 8, 44, 10, 44, 12, 44, 1381, 9, 44, 3, 44, + 1383, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1390, 8, 44, 10, + 44, 12, 44, 1393, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, + 1401, 8, 44, 10, 44, 12, 44, 1404, 9, 44, 1, 44, 1, 44, 5, 44, 1408, 8, + 44, 10, 44, 12, 44, 1411, 9, 44, 3, 44, 1413, 8, 44, 1, 45, 1, 45, 1, 46, + 3, 46, 1418, 8, 46, 1, 46, 1, 46, 3, 46, 1422, 8, 46, 1, 46, 3, 46, 1425, + 8, 46, 1, 47, 3, 47, 1428, 8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1433, 8, + 47, 1, 47, 1, 47, 3, 47, 1437, 8, 47, 1, 47, 4, 47, 1440, 8, 47, 11, 47, + 12, 47, 1441, 1, 47, 3, 47, 1445, 8, 47, 1, 47, 3, 47, 1448, 8, 47, 1, + 48, 1, 48, 1, 48, 3, 48, 1453, 8, 48, 1, 48, 1, 48, 3, 48, 1457, 8, 48, + 1, 48, 3, 48, 1460, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1467, + 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1472, 8, 48, 1, 48, 1, 48, 1, 48, 1, + 48, 1, 48, 5, 48, 1479, 8, 48, 10, 48, 12, 48, 1482, 9, 48, 1, 48, 1, 48, + 3, 48, 1486, 8, 48, 1, 48, 3, 48, 1489, 8, 48, 1, 48, 1, 48, 1, 48, 1, + 48, 5, 48, 1495, 8, 48, 10, 48, 12, 48, 1498, 9, 48, 1, 48, 3, 48, 1501, + 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1509, 8, 48, 1, + 48, 3, 48, 1512, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1517, 8, 48, 1, 48, + 1, 48, 3, 48, 1521, 8, 48, 1, 48, 3, 48, 1524, 8, 48, 1, 48, 1, 48, 1, + 48, 1, 48, 1, 48, 3, 48, 1531, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1536, + 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1543, 8, 48, 10, 48, 12, + 48, 1546, 9, 48, 1, 48, 1, 48, 3, 48, 1550, 8, 48, 1, 48, 3, 48, 1553, + 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1559, 8, 48, 10, 48, 12, 48, + 1562, 9, 48, 1, 48, 3, 48, 1565, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, + 48, 1, 48, 3, 48, 1573, 8, 48, 1, 48, 3, 48, 1576, 8, 48, 3, 48, 1578, + 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1587, 8, + 49, 1, 49, 3, 49, 1590, 8, 49, 3, 49, 1592, 8, 49, 1, 50, 1, 50, 3, 50, + 1596, 8, 50, 1, 50, 1, 50, 3, 50, 1600, 8, 50, 1, 50, 3, 50, 1603, 8, 50, + 1, 50, 1, 50, 1, 50, 3, 50, 1608, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, + 51, 1, 51, 1, 51, 5, 51, 1617, 8, 51, 10, 51, 12, 51, 1620, 9, 51, 1, 51, + 1, 51, 3, 51, 1624, 8, 51, 1, 52, 1, 52, 3, 52, 1628, 8, 52, 1, 52, 1, + 52, 3, 52, 1632, 8, 52, 1, 53, 3, 53, 1635, 8, 53, 1, 53, 1, 53, 1, 53, + 3, 53, 1640, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1646, 8, 53, 1, + 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1653, 8, 53, 1, 53, 1, 53, 1, 53, + 5, 53, 1658, 8, 53, 10, 53, 12, 53, 1661, 9, 53, 1, 53, 1, 53, 3, 53, 1665, + 8, 53, 1, 53, 3, 53, 1668, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1674, + 8, 54, 10, 54, 12, 54, 1677, 9, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1682, 8, + 55, 1, 55, 1, 55, 1, 55, 3, 55, 1687, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, + 3, 55, 1693, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1700, 8, + 55, 1, 55, 1, 55, 1, 55, 5, 55, 1705, 8, 55, 10, 55, 12, 55, 1708, 9, 55, + 1, 55, 1, 55, 3, 55, 1712, 8, 55, 1, 55, 3, 55, 1715, 8, 55, 1, 55, 3, + 55, 1718, 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1723, 8, 56, 1, 56, 1, 56, + 1, 56, 3, 56, 1728, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1735, + 8, 56, 1, 57, 1, 57, 3, 57, 1739, 8, 57, 1, 57, 1, 57, 3, 57, 1743, 8, + 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 3, 59, 1753, + 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1760, 8, 59, 10, 59, 12, + 59, 1763, 9, 59, 3, 59, 1765, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, + 5, 59, 1772, 8, 59, 10, 59, 12, 59, 1775, 9, 59, 1, 59, 3, 59, 1778, 8, + 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1786, 8, 60, 1, 60, + 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1793, 8, 60, 10, 60, 12, 60, 1796, 9, + 60, 3, 60, 1798, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1805, + 8, 60, 10, 60, 12, 60, 1808, 9, 60, 3, 60, 1810, 8, 60, 1, 60, 3, 60, 1813, + 8, 60, 1, 60, 3, 60, 1816, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, + 61, 1, 61, 1, 61, 3, 61, 1826, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 62, 1, 62, 3, 62, 1835, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, + 63, 1842, 8, 63, 10, 63, 12, 63, 1845, 9, 63, 1, 63, 3, 63, 1848, 8, 63, + 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 3, 64, 1855, 8, 64, 1, 64, 1, 64, 1, + 64, 5, 64, 1860, 8, 64, 10, 64, 12, 64, 1863, 9, 64, 1, 64, 3, 64, 1866, + 8, 64, 1, 64, 1, 64, 3, 64, 1870, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, + 65, 5, 65, 1877, 8, 65, 10, 65, 12, 65, 1880, 9, 65, 1, 65, 3, 65, 1883, + 8, 65, 1, 65, 1, 65, 3, 65, 1887, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1892, + 8, 65, 1, 66, 1, 66, 3, 66, 1896, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1901, + 8, 66, 10, 66, 12, 66, 1904, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, + 5, 67, 1911, 8, 67, 10, 67, 12, 67, 1914, 9, 67, 1, 68, 1, 68, 1, 68, 1, + 68, 3, 68, 1920, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1925, 8, 69, 1, 69, + 3, 69, 1928, 8, 69, 1, 69, 1, 69, 3, 69, 1932, 8, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, - 1945, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, - 72, 1, 72, 3, 72, 1957, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, - 1, 73, 3, 73, 1966, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, - 74, 3, 74, 1975, 8, 74, 1, 74, 1, 74, 3, 74, 1979, 8, 74, 1, 74, 1, 74, - 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1989, 8, 74, 1, 74, 3, - 74, 1992, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, - 2001, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2010, - 8, 74, 1, 74, 3, 74, 2013, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2019, + 1946, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, + 72, 1, 72, 3, 72, 1958, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, + 1, 73, 3, 73, 1967, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, + 74, 3, 74, 1976, 8, 74, 1, 74, 1, 74, 3, 74, 1980, 8, 74, 1, 74, 1, 74, + 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1990, 8, 74, 1, 74, 3, + 74, 1993, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, + 2002, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2011, + 8, 74, 1, 74, 3, 74, 2014, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2020, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, - 74, 1, 74, 1, 74, 3, 74, 2033, 8, 74, 1, 74, 1, 74, 3, 74, 2037, 8, 74, - 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2048, - 8, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2053, 8, 74, 1, 75, 1, 75, 1, 75, 1, - 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 4, 77, 2064, 8, 77, 11, 77, 12, - 77, 2065, 1, 78, 1, 78, 1, 78, 4, 78, 2071, 8, 78, 11, 78, 12, 78, 2072, - 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 2081, 8, 80, 1, 80, 1, - 80, 1, 80, 3, 80, 2086, 8, 80, 5, 80, 2088, 8, 80, 10, 80, 12, 80, 2091, + 74, 1, 74, 1, 74, 3, 74, 2034, 8, 74, 1, 74, 1, 74, 3, 74, 2038, 8, 74, + 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2049, + 8, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2054, 8, 74, 1, 75, 1, 75, 1, 75, 1, + 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 4, 77, 2065, 8, 77, 11, 77, 12, + 77, 2066, 1, 78, 1, 78, 1, 78, 4, 78, 2072, 8, 78, 11, 78, 12, 78, 2073, + 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 2082, 8, 80, 1, 80, 1, + 80, 1, 80, 3, 80, 2087, 8, 80, 5, 80, 2089, 8, 80, 10, 80, 12, 80, 2092, 9, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, - 85, 3, 85, 2103, 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, - 1, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2116, 8, 90, 1, 90, 1, 90, 1, 91, 1, + 85, 3, 85, 2104, 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, + 1, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2117, 8, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, - 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 2173, 8, 114, 1, 114, 2, 449, 487, + 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 2174, 8, 114, 1, 114, 2, 449, 487, 1, 68, 115, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, @@ -347,827 +347,828 @@ func sqliteparserParserInit() { 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, - 224, 226, 228, 0, 29, 3, 0, 58, 58, 69, 69, 82, 82, 2, 0, 47, 47, 66, 66, - 1, 0, 134, 135, 2, 0, 147, 147, 172, 172, 1, 0, 8, 9, 2, 0, 59, 59, 142, - 142, 2, 0, 56, 56, 104, 104, 2, 0, 58, 58, 82, 82, 5, 0, 25, 25, 72, 72, - 81, 81, 122, 122, 126, 126, 4, 0, 84, 84, 133, 133, 139, 139, 146, 146, - 2, 0, 7, 7, 12, 13, 1, 0, 14, 17, 1, 0, 18, 21, 4, 0, 77, 77, 97, 97, 99, - 99, 118, 118, 3, 0, 25, 25, 72, 72, 126, 126, 5, 0, 52, 54, 104, 104, 173, - 174, 187, 187, 190, 191, 2, 0, 29, 29, 62, 62, 3, 0, 76, 76, 96, 96, 125, - 125, 3, 0, 128, 128, 155, 155, 180, 180, 2, 0, 5, 5, 106, 106, 1, 0, 177, - 178, 2, 0, 34, 34, 60, 60, 2, 0, 152, 152, 163, 163, 2, 0, 160, 160, 167, - 167, 2, 0, 161, 161, 168, 169, 2, 0, 162, 162, 164, 164, 2, 0, 8, 10, 102, - 102, 2, 0, 186, 186, 190, 190, 1, 0, 25, 181, 2480, 0, 233, 1, 0, 0, 0, - 2, 241, 1, 0, 0, 0, 4, 267, 1, 0, 0, 0, 6, 295, 1, 0, 0, 0, 8, 327, 1, - 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, 345, 1, 0, 0, 0, 14, 355, 1, 0, 0, 0, - 16, 359, 1, 0, 0, 0, 18, 370, 1, 0, 0, 0, 20, 373, 1, 0, 0, 0, 22, 379, - 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, 26, 425, 1, 0, 0, 0, 28, 427, 1, 0, 0, - 0, 30, 474, 1, 0, 0, 0, 32, 485, 1, 0, 0, 0, 34, 503, 1, 0, 0, 0, 36, 555, - 1, 0, 0, 0, 38, 561, 1, 0, 0, 0, 40, 602, 1, 0, 0, 0, 42, 644, 1, 0, 0, - 0, 44, 648, 1, 0, 0, 0, 46, 712, 1, 0, 0, 0, 48, 744, 1, 0, 0, 0, 50, 773, - 1, 0, 0, 0, 52, 794, 1, 0, 0, 0, 54, 808, 1, 0, 0, 0, 56, 819, 1, 0, 0, - 0, 58, 838, 1, 0, 0, 0, 60, 866, 1, 0, 0, 0, 62, 879, 1, 0, 0, 0, 64, 897, - 1, 0, 0, 0, 66, 903, 1, 0, 0, 0, 68, 1005, 1, 0, 0, 0, 70, 1126, 1, 0, - 0, 0, 72, 1136, 1, 0, 0, 0, 74, 1211, 1, 0, 0, 0, 76, 1213, 1, 0, 0, 0, - 78, 1260, 1, 0, 0, 0, 80, 1278, 1, 0, 0, 0, 82, 1280, 1, 0, 0, 0, 84, 1294, - 1, 0, 0, 0, 86, 1311, 1, 0, 0, 0, 88, 1411, 1, 0, 0, 0, 90, 1413, 1, 0, - 0, 0, 92, 1416, 1, 0, 0, 0, 94, 1426, 1, 0, 0, 0, 96, 1576, 1, 0, 0, 0, - 98, 1590, 1, 0, 0, 0, 100, 1606, 1, 0, 0, 0, 102, 1622, 1, 0, 0, 0, 104, - 1630, 1, 0, 0, 0, 106, 1633, 1, 0, 0, 0, 108, 1668, 1, 0, 0, 0, 110, 1680, - 1, 0, 0, 0, 112, 1721, 1, 0, 0, 0, 114, 1735, 1, 0, 0, 0, 116, 1743, 1, - 0, 0, 0, 118, 1749, 1, 0, 0, 0, 120, 1780, 1, 0, 0, 0, 122, 1816, 1, 0, - 0, 0, 124, 1826, 1, 0, 0, 0, 126, 1835, 1, 0, 0, 0, 128, 1850, 1, 0, 0, - 0, 130, 1870, 1, 0, 0, 0, 132, 1892, 1, 0, 0, 0, 134, 1904, 1, 0, 0, 0, - 136, 1914, 1, 0, 0, 0, 138, 1920, 1, 0, 0, 0, 140, 1932, 1, 0, 0, 0, 142, - 1944, 1, 0, 0, 0, 144, 1956, 1, 0, 0, 0, 146, 1965, 1, 0, 0, 0, 148, 2052, - 1, 0, 0, 0, 150, 2054, 1, 0, 0, 0, 152, 2057, 1, 0, 0, 0, 154, 2060, 1, - 0, 0, 0, 156, 2067, 1, 0, 0, 0, 158, 2074, 1, 0, 0, 0, 160, 2078, 1, 0, - 0, 0, 162, 2092, 1, 0, 0, 0, 164, 2094, 1, 0, 0, 0, 166, 2096, 1, 0, 0, - 0, 168, 2098, 1, 0, 0, 0, 170, 2102, 1, 0, 0, 0, 172, 2104, 1, 0, 0, 0, - 174, 2106, 1, 0, 0, 0, 176, 2108, 1, 0, 0, 0, 178, 2110, 1, 0, 0, 0, 180, - 2115, 1, 0, 0, 0, 182, 2119, 1, 0, 0, 0, 184, 2121, 1, 0, 0, 0, 186, 2123, - 1, 0, 0, 0, 188, 2125, 1, 0, 0, 0, 190, 2127, 1, 0, 0, 0, 192, 2129, 1, - 0, 0, 0, 194, 2131, 1, 0, 0, 0, 196, 2133, 1, 0, 0, 0, 198, 2135, 1, 0, - 0, 0, 200, 2137, 1, 0, 0, 0, 202, 2139, 1, 0, 0, 0, 204, 2141, 1, 0, 0, - 0, 206, 2143, 1, 0, 0, 0, 208, 2145, 1, 0, 0, 0, 210, 2147, 1, 0, 0, 0, - 212, 2149, 1, 0, 0, 0, 214, 2151, 1, 0, 0, 0, 216, 2153, 1, 0, 0, 0, 218, - 2155, 1, 0, 0, 0, 220, 2157, 1, 0, 0, 0, 222, 2159, 1, 0, 0, 0, 224, 2161, - 1, 0, 0, 0, 226, 2163, 1, 0, 0, 0, 228, 2172, 1, 0, 0, 0, 230, 232, 3, - 2, 1, 0, 231, 230, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, - 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, - 237, 5, 0, 0, 1, 237, 1, 1, 0, 0, 0, 238, 240, 5, 1, 0, 0, 239, 238, 1, - 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, - 0, 242, 244, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244, 253, 3, 4, 2, 0, 245, - 247, 5, 1, 0, 0, 246, 245, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 246, - 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 3, 4, - 2, 0, 251, 246, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, - 253, 254, 1, 0, 0, 0, 254, 259, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, - 258, 5, 1, 0, 0, 257, 256, 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, - 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 3, 1, 0, 0, 0, 261, 259, 1, 0, 0, - 0, 262, 265, 5, 71, 0, 0, 263, 264, 5, 114, 0, 0, 264, 266, 5, 111, 0, - 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, 267, - 262, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 293, 1, 0, 0, 0, 269, 294, - 3, 6, 3, 0, 270, 294, 3, 8, 4, 0, 271, 294, 3, 10, 5, 0, 272, 294, 3, 12, - 6, 0, 273, 294, 3, 14, 7, 0, 274, 294, 3, 22, 11, 0, 275, 294, 3, 28, 14, - 0, 276, 294, 3, 44, 22, 0, 277, 294, 3, 46, 23, 0, 278, 294, 3, 48, 24, - 0, 279, 294, 3, 60, 30, 0, 280, 294, 3, 62, 31, 0, 281, 294, 3, 64, 32, - 0, 282, 294, 3, 66, 33, 0, 283, 294, 3, 74, 37, 0, 284, 294, 3, 78, 39, - 0, 285, 294, 3, 82, 41, 0, 286, 294, 3, 20, 10, 0, 287, 294, 3, 16, 8, - 0, 288, 294, 3, 18, 9, 0, 289, 294, 3, 84, 42, 0, 290, 294, 3, 106, 53, - 0, 291, 294, 3, 110, 55, 0, 292, 294, 3, 114, 57, 0, 293, 269, 1, 0, 0, - 0, 293, 270, 1, 0, 0, 0, 293, 271, 1, 0, 0, 0, 293, 272, 1, 0, 0, 0, 293, - 273, 1, 0, 0, 0, 293, 274, 1, 0, 0, 0, 293, 275, 1, 0, 0, 0, 293, 276, - 1, 0, 0, 0, 293, 277, 1, 0, 0, 0, 293, 278, 1, 0, 0, 0, 293, 279, 1, 0, - 0, 0, 293, 280, 1, 0, 0, 0, 293, 281, 1, 0, 0, 0, 293, 282, 1, 0, 0, 0, - 293, 283, 1, 0, 0, 0, 293, 284, 1, 0, 0, 0, 293, 285, 1, 0, 0, 0, 293, - 286, 1, 0, 0, 0, 293, 287, 1, 0, 0, 0, 293, 288, 1, 0, 0, 0, 293, 289, - 1, 0, 0, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, - 0, 0, 294, 5, 1, 0, 0, 0, 295, 296, 5, 30, 0, 0, 296, 300, 5, 133, 0, 0, - 297, 298, 3, 182, 91, 0, 298, 299, 5, 2, 0, 0, 299, 301, 1, 0, 0, 0, 300, - 297, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 325, - 3, 184, 92, 0, 303, 313, 5, 121, 0, 0, 304, 305, 5, 137, 0, 0, 305, 314, - 3, 188, 94, 0, 306, 308, 5, 46, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, - 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 3, 190, 95, 0, 310, 311, 5, 137, - 0, 0, 311, 312, 3, 190, 95, 0, 312, 314, 1, 0, 0, 0, 313, 304, 1, 0, 0, - 0, 313, 307, 1, 0, 0, 0, 314, 326, 1, 0, 0, 0, 315, 317, 5, 27, 0, 0, 316, - 318, 5, 46, 0, 0, 317, 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, - 1, 0, 0, 0, 319, 326, 3, 30, 15, 0, 320, 322, 5, 63, 0, 0, 321, 323, 5, - 46, 0, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, - 0, 324, 326, 3, 190, 95, 0, 325, 303, 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, - 325, 320, 1, 0, 0, 0, 326, 7, 1, 0, 0, 0, 327, 335, 5, 31, 0, 0, 328, 336, - 3, 182, 91, 0, 329, 330, 3, 182, 91, 0, 330, 331, 5, 2, 0, 0, 331, 333, - 1, 0, 0, 0, 332, 329, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 334, 1, 0, - 0, 0, 334, 336, 3, 186, 93, 0, 335, 328, 1, 0, 0, 0, 335, 332, 1, 0, 0, - 0, 335, 336, 1, 0, 0, 0, 336, 9, 1, 0, 0, 0, 337, 339, 5, 35, 0, 0, 338, - 340, 5, 55, 0, 0, 339, 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, - 1, 0, 0, 0, 341, 342, 3, 68, 34, 0, 342, 343, 5, 33, 0, 0, 343, 344, 3, - 182, 91, 0, 344, 11, 1, 0, 0, 0, 345, 347, 5, 38, 0, 0, 346, 348, 7, 0, - 0, 0, 347, 346, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 353, 1, 0, 0, 0, - 349, 351, 5, 138, 0, 0, 350, 352, 3, 212, 106, 0, 351, 350, 1, 0, 0, 0, - 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 353, - 354, 1, 0, 0, 0, 354, 13, 1, 0, 0, 0, 355, 357, 7, 1, 0, 0, 356, 358, 5, - 138, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 15, 1, 0, 0, - 0, 359, 361, 5, 126, 0, 0, 360, 362, 5, 138, 0, 0, 361, 360, 1, 0, 0, 0, - 361, 362, 1, 0, 0, 0, 362, 368, 1, 0, 0, 0, 363, 365, 5, 137, 0, 0, 364, - 366, 5, 129, 0, 0, 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, - 1, 0, 0, 0, 367, 369, 3, 206, 103, 0, 368, 363, 1, 0, 0, 0, 368, 369, 1, - 0, 0, 0, 369, 17, 1, 0, 0, 0, 370, 371, 5, 129, 0, 0, 371, 372, 3, 206, - 103, 0, 372, 19, 1, 0, 0, 0, 373, 375, 5, 120, 0, 0, 374, 376, 5, 129, - 0, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, - 377, 378, 3, 206, 103, 0, 378, 21, 1, 0, 0, 0, 379, 381, 5, 50, 0, 0, 380, - 382, 5, 141, 0, 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, - 1, 0, 0, 0, 383, 387, 5, 84, 0, 0, 384, 385, 5, 80, 0, 0, 385, 386, 5, - 102, 0, 0, 386, 388, 5, 70, 0, 0, 387, 384, 1, 0, 0, 0, 387, 388, 1, 0, - 0, 0, 388, 392, 1, 0, 0, 0, 389, 390, 3, 182, 91, 0, 390, 391, 5, 2, 0, - 0, 391, 393, 1, 0, 0, 0, 392, 389, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, - 394, 1, 0, 0, 0, 394, 395, 3, 196, 98, 0, 395, 396, 5, 107, 0, 0, 396, - 397, 3, 184, 92, 0, 397, 398, 5, 3, 0, 0, 398, 403, 3, 24, 12, 0, 399, - 400, 5, 5, 0, 0, 400, 402, 3, 24, 12, 0, 401, 399, 1, 0, 0, 0, 402, 405, - 1, 0, 0, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 1, 0, - 0, 0, 405, 403, 1, 0, 0, 0, 406, 409, 5, 4, 0, 0, 407, 408, 5, 149, 0, - 0, 408, 410, 3, 68, 34, 0, 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, - 410, 23, 1, 0, 0, 0, 411, 414, 3, 190, 95, 0, 412, 414, 3, 68, 34, 0, 413, - 411, 1, 0, 0, 0, 413, 412, 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 416, - 5, 45, 0, 0, 416, 418, 3, 192, 96, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, - 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 421, 3, 140, 70, 0, 420, 419, 1, 0, - 0, 0, 420, 421, 1, 0, 0, 0, 421, 25, 1, 0, 0, 0, 422, 423, 5, 151, 0, 0, - 423, 426, 5, 186, 0, 0, 424, 426, 5, 132, 0, 0, 425, 422, 1, 0, 0, 0, 425, - 424, 1, 0, 0, 0, 426, 27, 1, 0, 0, 0, 427, 429, 5, 50, 0, 0, 428, 430, - 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, - 0, 0, 431, 435, 5, 133, 0, 0, 432, 433, 5, 80, 0, 0, 433, 434, 5, 102, - 0, 0, 434, 436, 5, 70, 0, 0, 435, 432, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, - 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, 91, 0, 438, 439, 5, 2, 0, 0, 439, - 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, - 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, 444, 5, 3, 0, 0, 444, 449, 3, - 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, 3, 30, 15, 0, 447, 445, 1, 0, - 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, - 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 453, 5, 5, 0, 0, 453, - 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, 455, 458, 1, 0, 0, 0, 456, 454, - 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 459, 1, 0, 0, 0, 458, 456, 1, 0, - 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, 3, 26, 13, 0, 461, 462, 5, 5, 0, - 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, 0, 0, 0, 464, 467, 1, 0, 0, 0, - 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, 469, 1, 0, 0, 0, 467, - 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 473, - 1, 0, 0, 0, 470, 471, 5, 33, 0, 0, 471, 473, 3, 84, 42, 0, 472, 443, 1, - 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, 0, 0, 474, 476, 3, 190, 95, - 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, - 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, 0, 479, 478, 1, 0, 0, 0, 480, - 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482, 31, 1, - 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, 176, 88, 0, 485, 484, 1, 0, - 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 487, 485, 1, 0, 0, 0, - 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, 490, 491, 3, 36, 18, 0, 491, - 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, 494, 5, 3, 0, 0, 494, 495, - 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, 3, 36, 18, 0, 497, 498, 5, - 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, 0, 0, 0, 499, 493, 1, 0, 0, - 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, 0, 501, 502, 5, 49, 0, 0, 502, - 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 552, - 1, 0, 0, 0, 505, 506, 5, 113, 0, 0, 506, 508, 5, 95, 0, 0, 507, 509, 3, - 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 511, 1, 0, - 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0, 0, - 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 36, 0, 0, 514, 513, 1, 0, 0, 0, 514, - 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, 517, 5, 102, 0, 0, 517, 520, - 5, 104, 0, 0, 518, 520, 5, 141, 0, 0, 519, 516, 1, 0, 0, 0, 519, 518, 1, - 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, 3, 42, 21, 0, 522, 521, 1, 0, - 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, 0, 0, 0, 524, 525, 5, 44, 0, 0, - 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, 34, 0, 527, 528, 5, 4, 0, 0, 528, - 553, 1, 0, 0, 0, 529, 536, 5, 56, 0, 0, 530, 537, 3, 36, 18, 0, 531, 537, - 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, 533, 534, 3, 68, 34, 0, 534, 535, 5, - 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, 530, 1, 0, 0, 0, 536, 531, 1, 0, 0, - 0, 536, 532, 1, 0, 0, 0, 537, 553, 1, 0, 0, 0, 538, 539, 5, 45, 0, 0, 539, - 553, 3, 192, 96, 0, 540, 553, 3, 40, 20, 0, 541, 542, 5, 170, 0, 0, 542, - 544, 5, 171, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, - 1, 0, 0, 0, 545, 546, 5, 33, 0, 0, 546, 547, 5, 3, 0, 0, 547, 548, 3, 68, - 34, 0, 548, 550, 5, 4, 0, 0, 549, 551, 7, 3, 0, 0, 550, 549, 1, 0, 0, 0, - 550, 551, 1, 0, 0, 0, 551, 553, 1, 0, 0, 0, 552, 505, 1, 0, 0, 0, 552, - 519, 1, 0, 0, 0, 552, 524, 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552, 538, - 1, 0, 0, 0, 552, 540, 1, 0, 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1, 0, - 0, 0, 554, 556, 7, 4, 0, 0, 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, - 556, 557, 1, 0, 0, 0, 557, 558, 5, 187, 0, 0, 558, 37, 1, 0, 0, 0, 559, - 560, 5, 49, 0, 0, 560, 562, 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562, - 1, 0, 0, 0, 562, 600, 1, 0, 0, 0, 563, 564, 5, 113, 0, 0, 564, 567, 5, - 95, 0, 0, 565, 567, 5, 141, 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0, - 0, 0, 567, 568, 1, 0, 0, 0, 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12, - 0, 570, 571, 5, 5, 0, 0, 571, 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0, - 573, 576, 1, 0, 0, 0, 574, 572, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, - 577, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 577, 579, 5, 4, 0, 0, 578, 580, - 3, 42, 21, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 601, 1, - 0, 0, 0, 581, 582, 5, 44, 0, 0, 582, 583, 5, 3, 0, 0, 583, 584, 3, 68, - 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, 1, 0, 0, 0, 586, 587, 5, 74, 0, - 0, 587, 588, 5, 95, 0, 0, 588, 589, 5, 3, 0, 0, 589, 594, 3, 190, 95, 0, - 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, 95, 0, 592, 590, 1, 0, 0, 0, 593, - 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, - 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, 598, 5, 4, 0, 0, 598, 599, 3, 40, - 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, 1, 0, 0, 0, 600, 581, 1, 0, 0, 0, - 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, 0, 0, 602, 603, 5, 117, 0, 0, 603, - 615, 3, 194, 97, 0, 604, 605, 5, 3, 0, 0, 605, 610, 3, 190, 95, 0, 606, - 607, 5, 5, 0, 0, 607, 609, 3, 190, 95, 0, 608, 606, 1, 0, 0, 0, 609, 612, - 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 613, 1, 0, - 0, 0, 612, 610, 1, 0, 0, 0, 613, 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0, - 615, 604, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617, - 618, 5, 107, 0, 0, 618, 625, 7, 5, 0, 0, 619, 620, 5, 131, 0, 0, 620, 626, - 7, 6, 0, 0, 621, 626, 5, 41, 0, 0, 622, 626, 5, 123, 0, 0, 623, 624, 5, - 101, 0, 0, 624, 626, 5, 26, 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0, - 0, 0, 625, 622, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0, - 627, 628, 5, 99, 0, 0, 628, 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0, 629, - 627, 1, 0, 0, 0, 630, 633, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, - 1, 0, 0, 0, 632, 642, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 634, 636, 5, 102, - 0, 0, 635, 634, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, - 637, 640, 5, 57, 0, 0, 638, 639, 5, 86, 0, 0, 639, 641, 7, 7, 0, 0, 640, - 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 643, 1, 0, 0, 0, 642, 635, - 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 41, 1, 0, 0, 0, 644, 645, 5, 107, - 0, 0, 645, 646, 5, 48, 0, 0, 646, 647, 7, 8, 0, 0, 647, 43, 1, 0, 0, 0, - 648, 650, 5, 50, 0, 0, 649, 651, 7, 2, 0, 0, 650, 649, 1, 0, 0, 0, 650, - 651, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 656, 5, 139, 0, 0, 653, 654, - 5, 80, 0, 0, 654, 655, 5, 102, 0, 0, 655, 657, 5, 70, 0, 0, 656, 653, 1, - 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 661, 1, 0, 0, 0, 658, 659, 3, 182, - 91, 0, 659, 660, 5, 2, 0, 0, 660, 662, 1, 0, 0, 0, 661, 658, 1, 0, 0, 0, - 661, 662, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 668, 3, 198, 99, 0, 664, - 669, 5, 37, 0, 0, 665, 669, 5, 28, 0, 0, 666, 667, 5, 89, 0, 0, 667, 669, - 5, 105, 0, 0, 668, 664, 1, 0, 0, 0, 668, 665, 1, 0, 0, 0, 668, 666, 1, - 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 684, 1, 0, 0, 0, 670, 685, 5, 59, 0, - 0, 671, 685, 5, 88, 0, 0, 672, 682, 5, 142, 0, 0, 673, 674, 5, 105, 0, - 0, 674, 679, 3, 190, 95, 0, 675, 676, 5, 5, 0, 0, 676, 678, 3, 190, 95, - 0, 677, 675, 1, 0, 0, 0, 678, 681, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, - 680, 1, 0, 0, 0, 680, 683, 1, 0, 0, 0, 681, 679, 1, 0, 0, 0, 682, 673, - 1, 0, 0, 0, 682, 683, 1, 0, 0, 0, 683, 685, 1, 0, 0, 0, 684, 670, 1, 0, - 0, 0, 684, 671, 1, 0, 0, 0, 684, 672, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, - 686, 687, 5, 107, 0, 0, 687, 691, 3, 184, 92, 0, 688, 689, 5, 73, 0, 0, - 689, 690, 5, 64, 0, 0, 690, 692, 5, 127, 0, 0, 691, 688, 1, 0, 0, 0, 691, - 692, 1, 0, 0, 0, 692, 695, 1, 0, 0, 0, 693, 694, 5, 148, 0, 0, 694, 696, - 3, 68, 34, 0, 695, 693, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 697, 1, - 0, 0, 0, 697, 706, 5, 38, 0, 0, 698, 703, 3, 106, 53, 0, 699, 703, 3, 74, - 37, 0, 700, 703, 3, 60, 30, 0, 701, 703, 3, 84, 42, 0, 702, 698, 1, 0, - 0, 0, 702, 699, 1, 0, 0, 0, 702, 700, 1, 0, 0, 0, 702, 701, 1, 0, 0, 0, - 703, 704, 1, 0, 0, 0, 704, 705, 5, 1, 0, 0, 705, 707, 1, 0, 0, 0, 706, - 702, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 708, 709, - 1, 0, 0, 0, 709, 710, 1, 0, 0, 0, 710, 711, 5, 66, 0, 0, 711, 45, 1, 0, - 0, 0, 712, 714, 5, 50, 0, 0, 713, 715, 7, 2, 0, 0, 714, 713, 1, 0, 0, 0, - 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 720, 5, 146, 0, 0, 717, - 718, 5, 80, 0, 0, 718, 719, 5, 102, 0, 0, 719, 721, 5, 70, 0, 0, 720, 717, - 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 725, 1, 0, 0, 0, 722, 723, 3, 182, - 91, 0, 723, 724, 5, 2, 0, 0, 724, 726, 1, 0, 0, 0, 725, 722, 1, 0, 0, 0, - 725, 726, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727, 739, 3, 200, 100, 0, 728, - 729, 5, 3, 0, 0, 729, 734, 3, 190, 95, 0, 730, 731, 5, 5, 0, 0, 731, 733, - 3, 190, 95, 0, 732, 730, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, - 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, 736, 734, 1, 0, 0, - 0, 737, 738, 5, 4, 0, 0, 738, 740, 1, 0, 0, 0, 739, 728, 1, 0, 0, 0, 739, - 740, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 742, 5, 33, 0, 0, 742, 743, - 3, 84, 42, 0, 743, 47, 1, 0, 0, 0, 744, 745, 5, 50, 0, 0, 745, 746, 5, - 147, 0, 0, 746, 750, 5, 133, 0, 0, 747, 748, 5, 80, 0, 0, 748, 749, 5, - 102, 0, 0, 749, 751, 5, 70, 0, 0, 750, 747, 1, 0, 0, 0, 750, 751, 1, 0, - 0, 0, 751, 755, 1, 0, 0, 0, 752, 753, 3, 182, 91, 0, 753, 754, 5, 2, 0, - 0, 754, 756, 1, 0, 0, 0, 755, 752, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, - 757, 1, 0, 0, 0, 757, 758, 3, 184, 92, 0, 758, 759, 5, 143, 0, 0, 759, - 771, 3, 202, 101, 0, 760, 761, 5, 3, 0, 0, 761, 766, 3, 170, 85, 0, 762, - 763, 5, 5, 0, 0, 763, 765, 3, 170, 85, 0, 764, 762, 1, 0, 0, 0, 765, 768, - 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 766, 767, 1, 0, 0, 0, 767, 769, 1, 0, - 0, 0, 768, 766, 1, 0, 0, 0, 769, 770, 5, 4, 0, 0, 770, 772, 1, 0, 0, 0, - 771, 760, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 49, 1, 0, 0, 0, 773, 775, - 5, 150, 0, 0, 774, 776, 5, 116, 0, 0, 775, 774, 1, 0, 0, 0, 775, 776, 1, - 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 778, 3, 52, 26, 0, 778, 779, 5, 33, - 0, 0, 779, 780, 5, 3, 0, 0, 780, 781, 3, 84, 42, 0, 781, 791, 5, 4, 0, - 0, 782, 783, 5, 5, 0, 0, 783, 784, 3, 52, 26, 0, 784, 785, 5, 33, 0, 0, - 785, 786, 5, 3, 0, 0, 786, 787, 3, 84, 42, 0, 787, 788, 5, 4, 0, 0, 788, - 790, 1, 0, 0, 0, 789, 782, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, - 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 791, 1, 0, - 0, 0, 794, 806, 3, 184, 92, 0, 795, 796, 5, 3, 0, 0, 796, 801, 3, 190, - 95, 0, 797, 798, 5, 5, 0, 0, 798, 800, 3, 190, 95, 0, 799, 797, 1, 0, 0, - 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, - 804, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804, 805, 5, 4, 0, 0, 805, 807, - 1, 0, 0, 0, 806, 795, 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 53, 1, 0, - 0, 0, 808, 809, 3, 52, 26, 0, 809, 810, 5, 33, 0, 0, 810, 811, 5, 3, 0, - 0, 811, 812, 3, 162, 81, 0, 812, 814, 5, 140, 0, 0, 813, 815, 5, 29, 0, - 0, 814, 813, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, - 817, 3, 164, 82, 0, 817, 818, 5, 4, 0, 0, 818, 55, 1, 0, 0, 0, 819, 831, - 3, 184, 92, 0, 820, 821, 5, 3, 0, 0, 821, 826, 3, 190, 95, 0, 822, 823, - 5, 5, 0, 0, 823, 825, 3, 190, 95, 0, 824, 822, 1, 0, 0, 0, 825, 828, 1, - 0, 0, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 1, 0, 0, - 0, 828, 826, 1, 0, 0, 0, 829, 830, 5, 4, 0, 0, 830, 832, 1, 0, 0, 0, 831, - 820, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 834, - 5, 33, 0, 0, 834, 835, 5, 3, 0, 0, 835, 836, 3, 84, 42, 0, 836, 837, 5, - 4, 0, 0, 837, 57, 1, 0, 0, 0, 838, 847, 5, 124, 0, 0, 839, 848, 5, 7, 0, - 0, 840, 845, 3, 68, 34, 0, 841, 843, 5, 33, 0, 0, 842, 841, 1, 0, 0, 0, - 842, 843, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 846, 3, 172, 86, 0, 845, - 842, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 839, - 1, 0, 0, 0, 847, 840, 1, 0, 0, 0, 848, 862, 1, 0, 0, 0, 849, 858, 5, 5, - 0, 0, 850, 859, 5, 7, 0, 0, 851, 856, 3, 68, 34, 0, 852, 854, 5, 33, 0, - 0, 853, 852, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854, 855, 1, 0, 0, 0, 855, - 857, 3, 172, 86, 0, 856, 853, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, - 1, 0, 0, 0, 858, 850, 1, 0, 0, 0, 858, 851, 1, 0, 0, 0, 859, 861, 1, 0, - 0, 0, 860, 849, 1, 0, 0, 0, 861, 864, 1, 0, 0, 0, 862, 860, 1, 0, 0, 0, - 862, 863, 1, 0, 0, 0, 863, 59, 1, 0, 0, 0, 864, 862, 1, 0, 0, 0, 865, 867, - 3, 50, 25, 0, 866, 865, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 1, - 0, 0, 0, 868, 869, 5, 59, 0, 0, 869, 870, 5, 75, 0, 0, 870, 873, 3, 112, - 56, 0, 871, 872, 5, 149, 0, 0, 872, 874, 3, 68, 34, 0, 873, 871, 1, 0, - 0, 0, 873, 874, 1, 0, 0, 0, 874, 876, 1, 0, 0, 0, 875, 877, 3, 58, 29, - 0, 876, 875, 1, 0, 0, 0, 876, 877, 1, 0, 0, 0, 877, 61, 1, 0, 0, 0, 878, - 880, 3, 50, 25, 0, 879, 878, 1, 0, 0, 0, 879, 880, 1, 0, 0, 0, 880, 881, - 1, 0, 0, 0, 881, 882, 5, 59, 0, 0, 882, 883, 5, 75, 0, 0, 883, 886, 3, - 112, 56, 0, 884, 885, 5, 149, 0, 0, 885, 887, 3, 68, 34, 0, 886, 884, 1, - 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 892, 1, 0, 0, 0, 888, 890, 3, 134, - 67, 0, 889, 888, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, - 891, 893, 3, 136, 68, 0, 892, 889, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, - 895, 1, 0, 0, 0, 894, 896, 3, 58, 29, 0, 895, 894, 1, 0, 0, 0, 895, 896, - 1, 0, 0, 0, 896, 63, 1, 0, 0, 0, 897, 899, 5, 61, 0, 0, 898, 900, 5, 55, - 0, 0, 899, 898, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, - 901, 902, 3, 182, 91, 0, 902, 65, 1, 0, 0, 0, 903, 904, 5, 63, 0, 0, 904, - 907, 7, 9, 0, 0, 905, 906, 5, 80, 0, 0, 906, 908, 5, 70, 0, 0, 907, 905, - 1, 0, 0, 0, 907, 908, 1, 0, 0, 0, 908, 912, 1, 0, 0, 0, 909, 910, 3, 182, - 91, 0, 910, 911, 5, 2, 0, 0, 911, 913, 1, 0, 0, 0, 912, 909, 1, 0, 0, 0, - 912, 913, 1, 0, 0, 0, 913, 914, 1, 0, 0, 0, 914, 915, 3, 228, 114, 0, 915, - 67, 1, 0, 0, 0, 916, 917, 6, 34, -1, 0, 917, 1006, 3, 72, 36, 0, 918, 1006, - 5, 188, 0, 0, 919, 1006, 5, 189, 0, 0, 920, 921, 3, 182, 91, 0, 921, 922, - 5, 2, 0, 0, 922, 924, 1, 0, 0, 0, 923, 920, 1, 0, 0, 0, 923, 924, 1, 0, - 0, 0, 924, 925, 1, 0, 0, 0, 925, 926, 3, 184, 92, 0, 926, 927, 5, 2, 0, - 0, 927, 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, - 930, 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931, 932, 3, 166, 83, 0, 932, - 933, 3, 68, 34, 20, 933, 1006, 1, 0, 0, 0, 934, 935, 3, 180, 90, 0, 935, - 948, 5, 3, 0, 0, 936, 938, 5, 62, 0, 0, 937, 936, 1, 0, 0, 0, 937, 938, - 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68, 34, 0, 940, 941, 5, - 5, 0, 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0, 0, 943, 946, 1, 0, - 0, 0, 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 949, 1, 0, 0, 0, - 946, 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937, 1, 0, 0, 0, 948, - 947, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, - 5, 4, 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, - 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0, 955, 954, 1, 0, - 0, 0, 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957, 958, 5, 3, 0, 0, - 958, 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962, 3, 68, 34, 0, 961, - 959, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, - 1, 0, 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 5, 4, - 0, 0, 967, 1006, 1, 0, 0, 0, 968, 969, 5, 43, 0, 0, 969, 970, 5, 3, 0, - 0, 970, 971, 3, 68, 34, 0, 971, 972, 5, 33, 0, 0, 972, 973, 3, 32, 16, - 0, 973, 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977, 5, 102, 0, 0, - 976, 975, 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, - 980, 5, 70, 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, - 1, 0, 0, 0, 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0, 983, 984, 5, - 4, 0, 0, 984, 1006, 1, 0, 0, 0, 985, 987, 5, 42, 0, 0, 986, 988, 3, 68, - 34, 0, 987, 986, 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994, 1, 0, 0, 0, - 989, 990, 5, 148, 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5, 136, 0, 0, - 992, 993, 3, 68, 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0, 0, 0, 995, - 996, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 1000, - 1, 0, 0, 0, 998, 999, 5, 65, 0, 0, 999, 1001, 3, 68, 34, 0, 1000, 998, - 1, 0, 0, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 1003, - 5, 66, 0, 0, 1003, 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35, 0, 1005, 916, - 1, 0, 0, 0, 1005, 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0, 1005, 928, 1, - 0, 0, 0, 1005, 931, 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005, 957, 1, 0, - 0, 0, 1005, 968, 1, 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985, 1, 0, 0, - 0, 1005, 1004, 1, 0, 0, 0, 1006, 1123, 1, 0, 0, 0, 1007, 1008, 10, 19, - 0, 0, 1008, 1009, 5, 11, 0, 0, 1009, 1122, 3, 68, 34, 20, 1010, 1011, 10, - 18, 0, 0, 1011, 1012, 7, 10, 0, 0, 1012, 1122, 3, 68, 34, 19, 1013, 1014, - 10, 17, 0, 0, 1014, 1015, 7, 4, 0, 0, 1015, 1122, 3, 68, 34, 18, 1016, - 1017, 10, 16, 0, 0, 1017, 1018, 7, 11, 0, 0, 1018, 1122, 3, 68, 34, 17, - 1019, 1020, 10, 15, 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1122, 3, 68, 34, - 16, 1022, 1038, 10, 14, 0, 0, 1023, 1039, 5, 6, 0, 0, 1024, 1039, 5, 22, - 0, 0, 1025, 1039, 5, 23, 0, 0, 1026, 1039, 5, 24, 0, 0, 1027, 1039, 5, - 92, 0, 0, 1028, 1029, 5, 92, 0, 0, 1029, 1039, 5, 102, 0, 0, 1030, 1032, - 5, 102, 0, 0, 1031, 1030, 1, 0, 0, 0, 1031, 1032, 1, 0, 0, 0, 1032, 1033, - 1, 0, 0, 0, 1033, 1039, 5, 83, 0, 0, 1034, 1039, 5, 97, 0, 0, 1035, 1039, - 5, 77, 0, 0, 1036, 1039, 5, 99, 0, 0, 1037, 1039, 5, 118, 0, 0, 1038, 1023, - 1, 0, 0, 0, 1038, 1024, 1, 0, 0, 0, 1038, 1025, 1, 0, 0, 0, 1038, 1026, - 1, 0, 0, 0, 1038, 1027, 1, 0, 0, 0, 1038, 1028, 1, 0, 0, 0, 1038, 1031, - 1, 0, 0, 0, 1038, 1034, 1, 0, 0, 0, 1038, 1035, 1, 0, 0, 0, 1038, 1036, - 1, 0, 0, 0, 1038, 1037, 1, 0, 0, 0, 1039, 1040, 1, 0, 0, 0, 1040, 1122, - 3, 68, 34, 15, 1041, 1042, 10, 12, 0, 0, 1042, 1043, 5, 32, 0, 0, 1043, - 1122, 3, 68, 34, 13, 1044, 1045, 10, 11, 0, 0, 1045, 1046, 5, 108, 0, 0, - 1046, 1122, 3, 68, 34, 12, 1047, 1049, 10, 4, 0, 0, 1048, 1050, 5, 102, - 0, 0, 1049, 1048, 1, 0, 0, 0, 1049, 1050, 1, 0, 0, 0, 1050, 1051, 1, 0, - 0, 0, 1051, 1052, 5, 39, 0, 0, 1052, 1053, 3, 68, 34, 0, 1053, 1054, 5, - 32, 0, 0, 1054, 1055, 3, 68, 34, 5, 1055, 1122, 1, 0, 0, 0, 1056, 1058, - 10, 13, 0, 0, 1057, 1059, 5, 102, 0, 0, 1058, 1057, 1, 0, 0, 0, 1058, 1059, - 1, 0, 0, 0, 1059, 1060, 1, 0, 0, 0, 1060, 1099, 5, 83, 0, 0, 1061, 1071, - 5, 3, 0, 0, 1062, 1072, 3, 84, 42, 0, 1063, 1068, 3, 68, 34, 0, 1064, 1065, - 5, 5, 0, 0, 1065, 1067, 3, 68, 34, 0, 1066, 1064, 1, 0, 0, 0, 1067, 1070, - 1, 0, 0, 0, 1068, 1066, 1, 0, 0, 0, 1068, 1069, 1, 0, 0, 0, 1069, 1072, - 1, 0, 0, 0, 1070, 1068, 1, 0, 0, 0, 1071, 1062, 1, 0, 0, 0, 1071, 1063, - 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1073, 1, 0, 0, 0, 1073, 1100, - 5, 4, 0, 0, 1074, 1075, 3, 182, 91, 0, 1075, 1076, 5, 2, 0, 0, 1076, 1078, - 1, 0, 0, 0, 1077, 1074, 1, 0, 0, 0, 1077, 1078, 1, 0, 0, 0, 1078, 1079, - 1, 0, 0, 0, 1079, 1100, 3, 184, 92, 0, 1080, 1081, 3, 182, 91, 0, 1081, - 1082, 5, 2, 0, 0, 1082, 1084, 1, 0, 0, 0, 1083, 1080, 1, 0, 0, 0, 1083, - 1084, 1, 0, 0, 0, 1084, 1085, 1, 0, 0, 0, 1085, 1086, 3, 226, 113, 0, 1086, - 1095, 5, 3, 0, 0, 1087, 1092, 3, 68, 34, 0, 1088, 1089, 5, 5, 0, 0, 1089, - 1091, 3, 68, 34, 0, 1090, 1088, 1, 0, 0, 0, 1091, 1094, 1, 0, 0, 0, 1092, - 1090, 1, 0, 0, 0, 1092, 1093, 1, 0, 0, 0, 1093, 1096, 1, 0, 0, 0, 1094, - 1092, 1, 0, 0, 0, 1095, 1087, 1, 0, 0, 0, 1095, 1096, 1, 0, 0, 0, 1096, - 1097, 1, 0, 0, 0, 1097, 1098, 5, 4, 0, 0, 1098, 1100, 1, 0, 0, 0, 1099, - 1061, 1, 0, 0, 0, 1099, 1077, 1, 0, 0, 0, 1099, 1083, 1, 0, 0, 0, 1100, - 1122, 1, 0, 0, 0, 1101, 1102, 10, 7, 0, 0, 1102, 1103, 5, 45, 0, 0, 1103, - 1122, 3, 192, 96, 0, 1104, 1106, 10, 6, 0, 0, 1105, 1107, 5, 102, 0, 0, - 1106, 1105, 1, 0, 0, 0, 1106, 1107, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, - 1108, 1109, 7, 13, 0, 0, 1109, 1112, 3, 68, 34, 0, 1110, 1111, 5, 67, 0, - 0, 1111, 1113, 3, 68, 34, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, - 0, 0, 1113, 1122, 1, 0, 0, 0, 1114, 1119, 10, 5, 0, 0, 1115, 1120, 5, 93, - 0, 0, 1116, 1120, 5, 103, 0, 0, 1117, 1118, 5, 102, 0, 0, 1118, 1120, 5, - 104, 0, 0, 1119, 1115, 1, 0, 0, 0, 1119, 1116, 1, 0, 0, 0, 1119, 1117, - 1, 0, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1007, 1, 0, 0, 0, 1121, 1010, - 1, 0, 0, 0, 1121, 1013, 1, 0, 0, 0, 1121, 1016, 1, 0, 0, 0, 1121, 1019, - 1, 0, 0, 0, 1121, 1022, 1, 0, 0, 0, 1121, 1041, 1, 0, 0, 0, 1121, 1044, - 1, 0, 0, 0, 1121, 1047, 1, 0, 0, 0, 1121, 1056, 1, 0, 0, 0, 1121, 1101, - 1, 0, 0, 0, 1121, 1104, 1, 0, 0, 0, 1121, 1114, 1, 0, 0, 0, 1122, 1125, - 1, 0, 0, 0, 1123, 1121, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 69, 1, - 0, 0, 0, 1125, 1123, 1, 0, 0, 0, 1126, 1127, 5, 115, 0, 0, 1127, 1132, - 5, 3, 0, 0, 1128, 1133, 5, 81, 0, 0, 1129, 1130, 7, 14, 0, 0, 1130, 1131, - 5, 5, 0, 0, 1131, 1133, 3, 168, 84, 0, 1132, 1128, 1, 0, 0, 0, 1132, 1129, - 1, 0, 0, 0, 1133, 1134, 1, 0, 0, 0, 1134, 1135, 5, 4, 0, 0, 1135, 71, 1, - 0, 0, 0, 1136, 1137, 7, 15, 0, 0, 1137, 73, 1, 0, 0, 0, 1138, 1140, 3, - 50, 25, 0, 1139, 1138, 1, 0, 0, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1146, - 1, 0, 0, 0, 1141, 1147, 5, 88, 0, 0, 1142, 1147, 5, 122, 0, 0, 1143, 1144, - 5, 88, 0, 0, 1144, 1145, 5, 108, 0, 0, 1145, 1147, 7, 8, 0, 0, 1146, 1141, - 1, 0, 0, 0, 1146, 1142, 1, 0, 0, 0, 1146, 1143, 1, 0, 0, 0, 1147, 1148, - 1, 0, 0, 0, 1148, 1152, 5, 91, 0, 0, 1149, 1150, 3, 182, 91, 0, 1150, 1151, - 5, 2, 0, 0, 1151, 1153, 1, 0, 0, 0, 1152, 1149, 1, 0, 0, 0, 1152, 1153, - 1, 0, 0, 0, 1153, 1154, 1, 0, 0, 0, 1154, 1157, 3, 184, 92, 0, 1155, 1156, - 5, 33, 0, 0, 1156, 1158, 3, 208, 104, 0, 1157, 1155, 1, 0, 0, 0, 1157, - 1158, 1, 0, 0, 0, 1158, 1170, 1, 0, 0, 0, 1159, 1160, 5, 3, 0, 0, 1160, - 1165, 3, 190, 95, 0, 1161, 1162, 5, 5, 0, 0, 1162, 1164, 3, 190, 95, 0, - 1163, 1161, 1, 0, 0, 0, 1164, 1167, 1, 0, 0, 0, 1165, 1163, 1, 0, 0, 0, - 1165, 1166, 1, 0, 0, 0, 1166, 1168, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, - 1168, 1169, 5, 4, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1159, 1, 0, 0, 0, - 1170, 1171, 1, 0, 0, 0, 1171, 1201, 1, 0, 0, 0, 1172, 1173, 5, 145, 0, - 0, 1173, 1174, 5, 3, 0, 0, 1174, 1179, 3, 68, 34, 0, 1175, 1176, 5, 5, - 0, 0, 1176, 1178, 3, 68, 34, 0, 1177, 1175, 1, 0, 0, 0, 1178, 1181, 1, - 0, 0, 0, 1179, 1177, 1, 0, 0, 0, 1179, 1180, 1, 0, 0, 0, 1180, 1182, 1, - 0, 0, 0, 1181, 1179, 1, 0, 0, 0, 1182, 1197, 5, 4, 0, 0, 1183, 1184, 5, - 5, 0, 0, 1184, 1185, 5, 3, 0, 0, 1185, 1190, 3, 68, 34, 0, 1186, 1187, - 5, 5, 0, 0, 1187, 1189, 3, 68, 34, 0, 1188, 1186, 1, 0, 0, 0, 1189, 1192, - 1, 0, 0, 0, 1190, 1188, 1, 0, 0, 0, 1190, 1191, 1, 0, 0, 0, 1191, 1193, - 1, 0, 0, 0, 1192, 1190, 1, 0, 0, 0, 1193, 1194, 5, 4, 0, 0, 1194, 1196, - 1, 0, 0, 0, 1195, 1183, 1, 0, 0, 0, 1196, 1199, 1, 0, 0, 0, 1197, 1195, - 1, 0, 0, 0, 1197, 1198, 1, 0, 0, 0, 1198, 1202, 1, 0, 0, 0, 1199, 1197, - 1, 0, 0, 0, 1200, 1202, 3, 84, 42, 0, 1201, 1172, 1, 0, 0, 0, 1201, 1200, - 1, 0, 0, 0, 1202, 1204, 1, 0, 0, 0, 1203, 1205, 3, 76, 38, 0, 1204, 1203, - 1, 0, 0, 0, 1204, 1205, 1, 0, 0, 0, 1205, 1207, 1, 0, 0, 0, 1206, 1208, - 3, 58, 29, 0, 1207, 1206, 1, 0, 0, 0, 1207, 1208, 1, 0, 0, 0, 1208, 1212, - 1, 0, 0, 0, 1209, 1210, 5, 56, 0, 0, 1210, 1212, 5, 145, 0, 0, 1211, 1139, - 1, 0, 0, 0, 1211, 1209, 1, 0, 0, 0, 1212, 75, 1, 0, 0, 0, 1213, 1214, 5, - 107, 0, 0, 1214, 1229, 5, 48, 0, 0, 1215, 1216, 5, 3, 0, 0, 1216, 1221, - 3, 24, 12, 0, 1217, 1218, 5, 5, 0, 0, 1218, 1220, 3, 24, 12, 0, 1219, 1217, - 1, 0, 0, 0, 1220, 1223, 1, 0, 0, 0, 1221, 1219, 1, 0, 0, 0, 1221, 1222, - 1, 0, 0, 0, 1222, 1224, 1, 0, 0, 0, 1223, 1221, 1, 0, 0, 0, 1224, 1227, - 5, 4, 0, 0, 1225, 1226, 5, 149, 0, 0, 1226, 1228, 3, 68, 34, 0, 1227, 1225, - 1, 0, 0, 0, 1227, 1228, 1, 0, 0, 0, 1228, 1230, 1, 0, 0, 0, 1229, 1215, - 1, 0, 0, 0, 1229, 1230, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1258, - 5, 184, 0, 0, 1232, 1259, 5, 185, 0, 0, 1233, 1234, 5, 142, 0, 0, 1234, - 1237, 5, 131, 0, 0, 1235, 1238, 3, 190, 95, 0, 1236, 1238, 3, 108, 54, - 0, 1237, 1235, 1, 0, 0, 0, 1237, 1236, 1, 0, 0, 0, 1238, 1239, 1, 0, 0, - 0, 1239, 1240, 5, 6, 0, 0, 1240, 1251, 3, 68, 34, 0, 1241, 1244, 5, 5, - 0, 0, 1242, 1245, 3, 190, 95, 0, 1243, 1245, 3, 108, 54, 0, 1244, 1242, - 1, 0, 0, 0, 1244, 1243, 1, 0, 0, 0, 1245, 1246, 1, 0, 0, 0, 1246, 1247, - 5, 6, 0, 0, 1247, 1248, 3, 68, 34, 0, 1248, 1250, 1, 0, 0, 0, 1249, 1241, - 1, 0, 0, 0, 1250, 1253, 1, 0, 0, 0, 1251, 1249, 1, 0, 0, 0, 1251, 1252, - 1, 0, 0, 0, 1252, 1256, 1, 0, 0, 0, 1253, 1251, 1, 0, 0, 0, 1254, 1255, - 5, 149, 0, 0, 1255, 1257, 3, 68, 34, 0, 1256, 1254, 1, 0, 0, 0, 1256, 1257, - 1, 0, 0, 0, 1257, 1259, 1, 0, 0, 0, 1258, 1232, 1, 0, 0, 0, 1258, 1233, - 1, 0, 0, 0, 1259, 77, 1, 0, 0, 0, 1260, 1264, 5, 112, 0, 0, 1261, 1262, - 3, 182, 91, 0, 1262, 1263, 5, 2, 0, 0, 1263, 1265, 1, 0, 0, 0, 1264, 1261, - 1, 0, 0, 0, 1264, 1265, 1, 0, 0, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1273, - 3, 204, 102, 0, 1267, 1268, 5, 6, 0, 0, 1268, 1274, 3, 80, 40, 0, 1269, - 1270, 5, 3, 0, 0, 1270, 1271, 3, 80, 40, 0, 1271, 1272, 5, 4, 0, 0, 1272, - 1274, 1, 0, 0, 0, 1273, 1267, 1, 0, 0, 0, 1273, 1269, 1, 0, 0, 0, 1273, - 1274, 1, 0, 0, 0, 1274, 79, 1, 0, 0, 0, 1275, 1279, 3, 36, 18, 0, 1276, - 1279, 3, 176, 88, 0, 1277, 1279, 5, 190, 0, 0, 1278, 1275, 1, 0, 0, 0, - 1278, 1276, 1, 0, 0, 0, 1278, 1277, 1, 0, 0, 0, 1279, 81, 1, 0, 0, 0, 1280, - 1291, 5, 119, 0, 0, 1281, 1292, 3, 192, 96, 0, 1282, 1283, 3, 182, 91, - 0, 1283, 1284, 5, 2, 0, 0, 1284, 1286, 1, 0, 0, 0, 1285, 1282, 1, 0, 0, - 0, 1285, 1286, 1, 0, 0, 0, 1286, 1289, 1, 0, 0, 0, 1287, 1290, 3, 184, - 92, 0, 1288, 1290, 3, 196, 98, 0, 1289, 1287, 1, 0, 0, 0, 1289, 1288, 1, - 0, 0, 0, 1290, 1292, 1, 0, 0, 0, 1291, 1281, 1, 0, 0, 0, 1291, 1285, 1, - 0, 0, 0, 1291, 1292, 1, 0, 0, 0, 1292, 83, 1, 0, 0, 0, 1293, 1295, 3, 132, - 66, 0, 1294, 1293, 1, 0, 0, 0, 1294, 1295, 1, 0, 0, 0, 1295, 1296, 1, 0, - 0, 0, 1296, 1302, 3, 88, 44, 0, 1297, 1298, 3, 104, 52, 0, 1298, 1299, - 3, 88, 44, 0, 1299, 1301, 1, 0, 0, 0, 1300, 1297, 1, 0, 0, 0, 1301, 1304, - 1, 0, 0, 0, 1302, 1300, 1, 0, 0, 0, 1302, 1303, 1, 0, 0, 0, 1303, 1306, - 1, 0, 0, 0, 1304, 1302, 1, 0, 0, 0, 1305, 1307, 3, 134, 67, 0, 1306, 1305, - 1, 0, 0, 0, 1306, 1307, 1, 0, 0, 0, 1307, 1309, 1, 0, 0, 0, 1308, 1310, - 3, 136, 68, 0, 1309, 1308, 1, 0, 0, 0, 1309, 1310, 1, 0, 0, 0, 1310, 85, - 1, 0, 0, 0, 1311, 1318, 3, 96, 48, 0, 1312, 1313, 3, 100, 50, 0, 1313, - 1314, 3, 96, 48, 0, 1314, 1315, 3, 102, 51, 0, 1315, 1317, 1, 0, 0, 0, - 1316, 1312, 1, 0, 0, 0, 1317, 1320, 1, 0, 0, 0, 1318, 1316, 1, 0, 0, 0, - 1318, 1319, 1, 0, 0, 0, 1319, 87, 1, 0, 0, 0, 1320, 1318, 1, 0, 0, 0, 1321, - 1323, 5, 130, 0, 0, 1322, 1324, 7, 16, 0, 0, 1323, 1322, 1, 0, 0, 0, 1323, - 1324, 1, 0, 0, 0, 1324, 1325, 1, 0, 0, 0, 1325, 1330, 3, 98, 49, 0, 1326, - 1327, 5, 5, 0, 0, 1327, 1329, 3, 98, 49, 0, 1328, 1326, 1, 0, 0, 0, 1329, - 1332, 1, 0, 0, 0, 1330, 1328, 1, 0, 0, 0, 1330, 1331, 1, 0, 0, 0, 1331, - 1345, 1, 0, 0, 0, 1332, 1330, 1, 0, 0, 0, 1333, 1343, 5, 75, 0, 0, 1334, - 1339, 3, 96, 48, 0, 1335, 1336, 5, 5, 0, 0, 1336, 1338, 3, 96, 48, 0, 1337, - 1335, 1, 0, 0, 0, 1338, 1341, 1, 0, 0, 0, 1339, 1337, 1, 0, 0, 0, 1339, - 1340, 1, 0, 0, 0, 1340, 1344, 1, 0, 0, 0, 1341, 1339, 1, 0, 0, 0, 1342, - 1344, 3, 86, 43, 0, 1343, 1334, 1, 0, 0, 0, 1343, 1342, 1, 0, 0, 0, 1344, - 1346, 1, 0, 0, 0, 1345, 1333, 1, 0, 0, 0, 1345, 1346, 1, 0, 0, 0, 1346, - 1349, 1, 0, 0, 0, 1347, 1348, 5, 149, 0, 0, 1348, 1350, 3, 68, 34, 0, 1349, - 1347, 1, 0, 0, 0, 1349, 1350, 1, 0, 0, 0, 1350, 1365, 1, 0, 0, 0, 1351, - 1352, 5, 78, 0, 0, 1352, 1353, 5, 40, 0, 0, 1353, 1358, 3, 68, 34, 0, 1354, - 1355, 5, 5, 0, 0, 1355, 1357, 3, 68, 34, 0, 1356, 1354, 1, 0, 0, 0, 1357, - 1360, 1, 0, 0, 0, 1358, 1356, 1, 0, 0, 0, 1358, 1359, 1, 0, 0, 0, 1359, - 1363, 1, 0, 0, 0, 1360, 1358, 1, 0, 0, 0, 1361, 1362, 5, 79, 0, 0, 1362, - 1364, 3, 68, 34, 0, 1363, 1361, 1, 0, 0, 0, 1363, 1364, 1, 0, 0, 0, 1364, - 1366, 1, 0, 0, 0, 1365, 1351, 1, 0, 0, 0, 1365, 1366, 1, 0, 0, 0, 1366, - 1381, 1, 0, 0, 0, 1367, 1368, 5, 175, 0, 0, 1368, 1369, 3, 214, 107, 0, - 1369, 1370, 5, 33, 0, 0, 1370, 1378, 3, 118, 59, 0, 1371, 1372, 5, 5, 0, - 0, 1372, 1373, 3, 214, 107, 0, 1373, 1374, 5, 33, 0, 0, 1374, 1375, 3, - 118, 59, 0, 1375, 1377, 1, 0, 0, 0, 1376, 1371, 1, 0, 0, 0, 1377, 1380, - 1, 0, 0, 0, 1378, 1376, 1, 0, 0, 0, 1378, 1379, 1, 0, 0, 0, 1379, 1382, - 1, 0, 0, 0, 1380, 1378, 1, 0, 0, 0, 1381, 1367, 1, 0, 0, 0, 1381, 1382, - 1, 0, 0, 0, 1382, 1412, 1, 0, 0, 0, 1383, 1384, 5, 145, 0, 0, 1384, 1385, - 5, 3, 0, 0, 1385, 1390, 3, 68, 34, 0, 1386, 1387, 5, 5, 0, 0, 1387, 1389, - 3, 68, 34, 0, 1388, 1386, 1, 0, 0, 0, 1389, 1392, 1, 0, 0, 0, 1390, 1388, - 1, 0, 0, 0, 1390, 1391, 1, 0, 0, 0, 1391, 1393, 1, 0, 0, 0, 1392, 1390, - 1, 0, 0, 0, 1393, 1408, 5, 4, 0, 0, 1394, 1395, 5, 5, 0, 0, 1395, 1396, - 5, 3, 0, 0, 1396, 1401, 3, 68, 34, 0, 1397, 1398, 5, 5, 0, 0, 1398, 1400, - 3, 68, 34, 0, 1399, 1397, 1, 0, 0, 0, 1400, 1403, 1, 0, 0, 0, 1401, 1399, - 1, 0, 0, 0, 1401, 1402, 1, 0, 0, 0, 1402, 1404, 1, 0, 0, 0, 1403, 1401, - 1, 0, 0, 0, 1404, 1405, 5, 4, 0, 0, 1405, 1407, 1, 0, 0, 0, 1406, 1394, - 1, 0, 0, 0, 1407, 1410, 1, 0, 0, 0, 1408, 1406, 1, 0, 0, 0, 1408, 1409, - 1, 0, 0, 0, 1409, 1412, 1, 0, 0, 0, 1410, 1408, 1, 0, 0, 0, 1411, 1321, - 1, 0, 0, 0, 1411, 1383, 1, 0, 0, 0, 1412, 89, 1, 0, 0, 0, 1413, 1414, 3, - 84, 42, 0, 1414, 91, 1, 0, 0, 0, 1415, 1417, 3, 132, 66, 0, 1416, 1415, - 1, 0, 0, 0, 1416, 1417, 1, 0, 0, 0, 1417, 1418, 1, 0, 0, 0, 1418, 1420, - 3, 88, 44, 0, 1419, 1421, 3, 134, 67, 0, 1420, 1419, 1, 0, 0, 0, 1420, - 1421, 1, 0, 0, 0, 1421, 1423, 1, 0, 0, 0, 1422, 1424, 3, 136, 68, 0, 1423, - 1422, 1, 0, 0, 0, 1423, 1424, 1, 0, 0, 0, 1424, 93, 1, 0, 0, 0, 1425, 1427, - 3, 132, 66, 0, 1426, 1425, 1, 0, 0, 0, 1426, 1427, 1, 0, 0, 0, 1427, 1428, - 1, 0, 0, 0, 1428, 1438, 3, 88, 44, 0, 1429, 1431, 5, 140, 0, 0, 1430, 1432, - 5, 29, 0, 0, 1431, 1430, 1, 0, 0, 0, 1431, 1432, 1, 0, 0, 0, 1432, 1436, - 1, 0, 0, 0, 1433, 1436, 5, 90, 0, 0, 1434, 1436, 5, 68, 0, 0, 1435, 1429, - 1, 0, 0, 0, 1435, 1433, 1, 0, 0, 0, 1435, 1434, 1, 0, 0, 0, 1436, 1437, - 1, 0, 0, 0, 1437, 1439, 3, 88, 44, 0, 1438, 1435, 1, 0, 0, 0, 1439, 1440, - 1, 0, 0, 0, 1440, 1438, 1, 0, 0, 0, 1440, 1441, 1, 0, 0, 0, 1441, 1443, - 1, 0, 0, 0, 1442, 1444, 3, 134, 67, 0, 1443, 1442, 1, 0, 0, 0, 1443, 1444, - 1, 0, 0, 0, 1444, 1446, 1, 0, 0, 0, 1445, 1447, 3, 136, 68, 0, 1446, 1445, - 1, 0, 0, 0, 1446, 1447, 1, 0, 0, 0, 1447, 95, 1, 0, 0, 0, 1448, 1449, 3, - 182, 91, 0, 1449, 1450, 5, 2, 0, 0, 1450, 1452, 1, 0, 0, 0, 1451, 1448, - 1, 0, 0, 0, 1451, 1452, 1, 0, 0, 0, 1452, 1453, 1, 0, 0, 0, 1453, 1458, - 3, 184, 92, 0, 1454, 1456, 5, 33, 0, 0, 1455, 1454, 1, 0, 0, 0, 1455, 1456, - 1, 0, 0, 0, 1456, 1457, 1, 0, 0, 0, 1457, 1459, 3, 208, 104, 0, 1458, 1455, - 1, 0, 0, 0, 1458, 1459, 1, 0, 0, 0, 1459, 1465, 1, 0, 0, 0, 1460, 1461, - 5, 85, 0, 0, 1461, 1462, 5, 40, 0, 0, 1462, 1466, 3, 196, 98, 0, 1463, - 1464, 5, 102, 0, 0, 1464, 1466, 5, 85, 0, 0, 1465, 1460, 1, 0, 0, 0, 1465, - 1463, 1, 0, 0, 0, 1465, 1466, 1, 0, 0, 0, 1466, 1577, 1, 0, 0, 0, 1467, - 1468, 3, 182, 91, 0, 1468, 1469, 5, 2, 0, 0, 1469, 1471, 1, 0, 0, 0, 1470, - 1467, 1, 0, 0, 0, 1470, 1471, 1, 0, 0, 0, 1471, 1472, 1, 0, 0, 0, 1472, - 1473, 3, 226, 113, 0, 1473, 1474, 5, 3, 0, 0, 1474, 1479, 3, 68, 34, 0, - 1475, 1476, 5, 5, 0, 0, 1476, 1478, 3, 68, 34, 0, 1477, 1475, 1, 0, 0, - 0, 1478, 1481, 1, 0, 0, 0, 1479, 1477, 1, 0, 0, 0, 1479, 1480, 1, 0, 0, - 0, 1480, 1482, 1, 0, 0, 0, 1481, 1479, 1, 0, 0, 0, 1482, 1487, 5, 4, 0, - 0, 1483, 1485, 5, 33, 0, 0, 1484, 1483, 1, 0, 0, 0, 1484, 1485, 1, 0, 0, - 0, 1485, 1486, 1, 0, 0, 0, 1486, 1488, 3, 208, 104, 0, 1487, 1484, 1, 0, - 0, 0, 1487, 1488, 1, 0, 0, 0, 1488, 1577, 1, 0, 0, 0, 1489, 1499, 5, 3, - 0, 0, 1490, 1495, 3, 96, 48, 0, 1491, 1492, 5, 5, 0, 0, 1492, 1494, 3, - 96, 48, 0, 1493, 1491, 1, 0, 0, 0, 1494, 1497, 1, 0, 0, 0, 1495, 1493, - 1, 0, 0, 0, 1495, 1496, 1, 0, 0, 0, 1496, 1500, 1, 0, 0, 0, 1497, 1495, - 1, 0, 0, 0, 1498, 1500, 3, 86, 43, 0, 1499, 1490, 1, 0, 0, 0, 1499, 1498, - 1, 0, 0, 0, 1500, 1501, 1, 0, 0, 0, 1501, 1502, 5, 4, 0, 0, 1502, 1577, - 1, 0, 0, 0, 1503, 1504, 5, 3, 0, 0, 1504, 1505, 3, 84, 42, 0, 1505, 1510, - 5, 4, 0, 0, 1506, 1508, 5, 33, 0, 0, 1507, 1506, 1, 0, 0, 0, 1507, 1508, - 1, 0, 0, 0, 1508, 1509, 1, 0, 0, 0, 1509, 1511, 3, 208, 104, 0, 1510, 1507, - 1, 0, 0, 0, 1510, 1511, 1, 0, 0, 0, 1511, 1577, 1, 0, 0, 0, 1512, 1513, - 3, 182, 91, 0, 1513, 1514, 5, 2, 0, 0, 1514, 1516, 1, 0, 0, 0, 1515, 1512, - 1, 0, 0, 0, 1515, 1516, 1, 0, 0, 0, 1516, 1517, 1, 0, 0, 0, 1517, 1522, - 3, 184, 92, 0, 1518, 1520, 5, 33, 0, 0, 1519, 1518, 1, 0, 0, 0, 1519, 1520, - 1, 0, 0, 0, 1520, 1521, 1, 0, 0, 0, 1521, 1523, 3, 210, 105, 0, 1522, 1519, - 1, 0, 0, 0, 1522, 1523, 1, 0, 0, 0, 1523, 1529, 1, 0, 0, 0, 1524, 1525, - 5, 85, 0, 0, 1525, 1526, 5, 40, 0, 0, 1526, 1530, 3, 196, 98, 0, 1527, - 1528, 5, 102, 0, 0, 1528, 1530, 5, 85, 0, 0, 1529, 1524, 1, 0, 0, 0, 1529, - 1527, 1, 0, 0, 0, 1529, 1530, 1, 0, 0, 0, 1530, 1577, 1, 0, 0, 0, 1531, - 1532, 3, 182, 91, 0, 1532, 1533, 5, 2, 0, 0, 1533, 1535, 1, 0, 0, 0, 1534, - 1531, 1, 0, 0, 0, 1534, 1535, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, - 1537, 3, 226, 113, 0, 1537, 1538, 5, 3, 0, 0, 1538, 1543, 3, 68, 34, 0, - 1539, 1540, 5, 5, 0, 0, 1540, 1542, 3, 68, 34, 0, 1541, 1539, 1, 0, 0, - 0, 1542, 1545, 1, 0, 0, 0, 1543, 1541, 1, 0, 0, 0, 1543, 1544, 1, 0, 0, - 0, 1544, 1546, 1, 0, 0, 0, 1545, 1543, 1, 0, 0, 0, 1546, 1551, 5, 4, 0, - 0, 1547, 1549, 5, 33, 0, 0, 1548, 1547, 1, 0, 0, 0, 1548, 1549, 1, 0, 0, - 0, 1549, 1550, 1, 0, 0, 0, 1550, 1552, 3, 210, 105, 0, 1551, 1548, 1, 0, - 0, 0, 1551, 1552, 1, 0, 0, 0, 1552, 1577, 1, 0, 0, 0, 1553, 1563, 5, 3, - 0, 0, 1554, 1559, 3, 96, 48, 0, 1555, 1556, 5, 5, 0, 0, 1556, 1558, 3, - 96, 48, 0, 1557, 1555, 1, 0, 0, 0, 1558, 1561, 1, 0, 0, 0, 1559, 1557, - 1, 0, 0, 0, 1559, 1560, 1, 0, 0, 0, 1560, 1564, 1, 0, 0, 0, 1561, 1559, - 1, 0, 0, 0, 1562, 1564, 3, 86, 43, 0, 1563, 1554, 1, 0, 0, 0, 1563, 1562, - 1, 0, 0, 0, 1564, 1565, 1, 0, 0, 0, 1565, 1566, 5, 4, 0, 0, 1566, 1577, - 1, 0, 0, 0, 1567, 1568, 5, 3, 0, 0, 1568, 1569, 3, 84, 42, 0, 1569, 1574, - 5, 4, 0, 0, 1570, 1572, 5, 33, 0, 0, 1571, 1570, 1, 0, 0, 0, 1571, 1572, - 1, 0, 0, 0, 1572, 1573, 1, 0, 0, 0, 1573, 1575, 3, 210, 105, 0, 1574, 1571, - 1, 0, 0, 0, 1574, 1575, 1, 0, 0, 0, 1575, 1577, 1, 0, 0, 0, 1576, 1451, - 1, 0, 0, 0, 1576, 1470, 1, 0, 0, 0, 1576, 1489, 1, 0, 0, 0, 1576, 1503, - 1, 0, 0, 0, 1576, 1515, 1, 0, 0, 0, 1576, 1534, 1, 0, 0, 0, 1576, 1553, - 1, 0, 0, 0, 1576, 1567, 1, 0, 0, 0, 1577, 97, 1, 0, 0, 0, 1578, 1591, 5, - 7, 0, 0, 1579, 1580, 3, 184, 92, 0, 1580, 1581, 5, 2, 0, 0, 1581, 1582, - 5, 7, 0, 0, 1582, 1591, 1, 0, 0, 0, 1583, 1588, 3, 68, 34, 0, 1584, 1586, - 5, 33, 0, 0, 1585, 1584, 1, 0, 0, 0, 1585, 1586, 1, 0, 0, 0, 1586, 1587, - 1, 0, 0, 0, 1587, 1589, 3, 172, 86, 0, 1588, 1585, 1, 0, 0, 0, 1588, 1589, - 1, 0, 0, 0, 1589, 1591, 1, 0, 0, 0, 1590, 1578, 1, 0, 0, 0, 1590, 1579, - 1, 0, 0, 0, 1590, 1583, 1, 0, 0, 0, 1591, 99, 1, 0, 0, 0, 1592, 1607, 5, - 5, 0, 0, 1593, 1595, 5, 100, 0, 0, 1594, 1593, 1, 0, 0, 0, 1594, 1595, - 1, 0, 0, 0, 1595, 1601, 1, 0, 0, 0, 1596, 1598, 7, 17, 0, 0, 1597, 1599, - 5, 110, 0, 0, 1598, 1597, 1, 0, 0, 0, 1598, 1599, 1, 0, 0, 0, 1599, 1602, - 1, 0, 0, 0, 1600, 1602, 5, 87, 0, 0, 1601, 1596, 1, 0, 0, 0, 1601, 1600, - 1, 0, 0, 0, 1601, 1602, 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1607, - 5, 94, 0, 0, 1604, 1605, 5, 51, 0, 0, 1605, 1607, 5, 94, 0, 0, 1606, 1592, - 1, 0, 0, 0, 1606, 1594, 1, 0, 0, 0, 1606, 1604, 1, 0, 0, 0, 1607, 101, - 1, 0, 0, 0, 1608, 1609, 5, 107, 0, 0, 1609, 1623, 3, 68, 34, 0, 1610, 1611, - 5, 143, 0, 0, 1611, 1612, 5, 3, 0, 0, 1612, 1617, 3, 190, 95, 0, 1613, - 1614, 5, 5, 0, 0, 1614, 1616, 3, 190, 95, 0, 1615, 1613, 1, 0, 0, 0, 1616, - 1619, 1, 0, 0, 0, 1617, 1615, 1, 0, 0, 0, 1617, 1618, 1, 0, 0, 0, 1618, - 1620, 1, 0, 0, 0, 1619, 1617, 1, 0, 0, 0, 1620, 1621, 5, 4, 0, 0, 1621, - 1623, 1, 0, 0, 0, 1622, 1608, 1, 0, 0, 0, 1622, 1610, 1, 0, 0, 0, 1622, - 1623, 1, 0, 0, 0, 1623, 103, 1, 0, 0, 0, 1624, 1626, 5, 140, 0, 0, 1625, - 1627, 5, 29, 0, 0, 1626, 1625, 1, 0, 0, 0, 1626, 1627, 1, 0, 0, 0, 1627, - 1631, 1, 0, 0, 0, 1628, 1631, 5, 90, 0, 0, 1629, 1631, 5, 68, 0, 0, 1630, - 1624, 1, 0, 0, 0, 1630, 1628, 1, 0, 0, 0, 1630, 1629, 1, 0, 0, 0, 1631, - 105, 1, 0, 0, 0, 1632, 1634, 3, 50, 25, 0, 1633, 1632, 1, 0, 0, 0, 1633, - 1634, 1, 0, 0, 0, 1634, 1635, 1, 0, 0, 0, 1635, 1638, 5, 142, 0, 0, 1636, - 1637, 5, 108, 0, 0, 1637, 1639, 7, 8, 0, 0, 1638, 1636, 1, 0, 0, 0, 1638, - 1639, 1, 0, 0, 0, 1639, 1640, 1, 0, 0, 0, 1640, 1641, 3, 112, 56, 0, 1641, - 1644, 5, 131, 0, 0, 1642, 1645, 3, 190, 95, 0, 1643, 1645, 3, 108, 54, - 0, 1644, 1642, 1, 0, 0, 0, 1644, 1643, 1, 0, 0, 0, 1645, 1646, 1, 0, 0, - 0, 1646, 1647, 5, 6, 0, 0, 1647, 1658, 3, 68, 34, 0, 1648, 1651, 5, 5, - 0, 0, 1649, 1652, 3, 190, 95, 0, 1650, 1652, 3, 108, 54, 0, 1651, 1649, - 1, 0, 0, 0, 1651, 1650, 1, 0, 0, 0, 1652, 1653, 1, 0, 0, 0, 1653, 1654, - 5, 6, 0, 0, 1654, 1655, 3, 68, 34, 0, 1655, 1657, 1, 0, 0, 0, 1656, 1648, - 1, 0, 0, 0, 1657, 1660, 1, 0, 0, 0, 1658, 1656, 1, 0, 0, 0, 1658, 1659, - 1, 0, 0, 0, 1659, 1663, 1, 0, 0, 0, 1660, 1658, 1, 0, 0, 0, 1661, 1662, - 5, 149, 0, 0, 1662, 1664, 3, 68, 34, 0, 1663, 1661, 1, 0, 0, 0, 1663, 1664, - 1, 0, 0, 0, 1664, 1666, 1, 0, 0, 0, 1665, 1667, 3, 58, 29, 0, 1666, 1665, - 1, 0, 0, 0, 1666, 1667, 1, 0, 0, 0, 1667, 107, 1, 0, 0, 0, 1668, 1669, - 5, 3, 0, 0, 1669, 1674, 3, 190, 95, 0, 1670, 1671, 5, 5, 0, 0, 1671, 1673, - 3, 190, 95, 0, 1672, 1670, 1, 0, 0, 0, 1673, 1676, 1, 0, 0, 0, 1674, 1672, - 1, 0, 0, 0, 1674, 1675, 1, 0, 0, 0, 1675, 1677, 1, 0, 0, 0, 1676, 1674, - 1, 0, 0, 0, 1677, 1678, 5, 4, 0, 0, 1678, 109, 1, 0, 0, 0, 1679, 1681, - 3, 50, 25, 0, 1680, 1679, 1, 0, 0, 0, 1680, 1681, 1, 0, 0, 0, 1681, 1682, - 1, 0, 0, 0, 1682, 1685, 5, 142, 0, 0, 1683, 1684, 5, 108, 0, 0, 1684, 1686, - 7, 8, 0, 0, 1685, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, 1687, - 1, 0, 0, 0, 1687, 1688, 3, 112, 56, 0, 1688, 1691, 5, 131, 0, 0, 1689, - 1692, 3, 190, 95, 0, 1690, 1692, 3, 108, 54, 0, 1691, 1689, 1, 0, 0, 0, - 1691, 1690, 1, 0, 0, 0, 1692, 1693, 1, 0, 0, 0, 1693, 1694, 5, 6, 0, 0, - 1694, 1705, 3, 68, 34, 0, 1695, 1698, 5, 5, 0, 0, 1696, 1699, 3, 190, 95, - 0, 1697, 1699, 3, 108, 54, 0, 1698, 1696, 1, 0, 0, 0, 1698, 1697, 1, 0, - 0, 0, 1699, 1700, 1, 0, 0, 0, 1700, 1701, 5, 6, 0, 0, 1701, 1702, 3, 68, - 34, 0, 1702, 1704, 1, 0, 0, 0, 1703, 1695, 1, 0, 0, 0, 1704, 1707, 1, 0, - 0, 0, 1705, 1703, 1, 0, 0, 0, 1705, 1706, 1, 0, 0, 0, 1706, 1710, 1, 0, - 0, 0, 1707, 1705, 1, 0, 0, 0, 1708, 1709, 5, 149, 0, 0, 1709, 1711, 3, - 68, 34, 0, 1710, 1708, 1, 0, 0, 0, 1710, 1711, 1, 0, 0, 0, 1711, 1716, - 1, 0, 0, 0, 1712, 1714, 3, 134, 67, 0, 1713, 1712, 1, 0, 0, 0, 1713, 1714, - 1, 0, 0, 0, 1714, 1715, 1, 0, 0, 0, 1715, 1717, 3, 136, 68, 0, 1716, 1713, - 1, 0, 0, 0, 1716, 1717, 1, 0, 0, 0, 1717, 111, 1, 0, 0, 0, 1718, 1719, - 3, 182, 91, 0, 1719, 1720, 5, 2, 0, 0, 1720, 1722, 1, 0, 0, 0, 1721, 1718, - 1, 0, 0, 0, 1721, 1722, 1, 0, 0, 0, 1722, 1723, 1, 0, 0, 0, 1723, 1726, - 3, 184, 92, 0, 1724, 1725, 5, 33, 0, 0, 1725, 1727, 3, 216, 108, 0, 1726, - 1724, 1, 0, 0, 0, 1726, 1727, 1, 0, 0, 0, 1727, 1733, 1, 0, 0, 0, 1728, - 1729, 5, 85, 0, 0, 1729, 1730, 5, 40, 0, 0, 1730, 1734, 3, 196, 98, 0, - 1731, 1732, 5, 102, 0, 0, 1732, 1734, 5, 85, 0, 0, 1733, 1728, 1, 0, 0, - 0, 1733, 1731, 1, 0, 0, 0, 1733, 1734, 1, 0, 0, 0, 1734, 113, 1, 0, 0, - 0, 1735, 1737, 5, 144, 0, 0, 1736, 1738, 3, 182, 91, 0, 1737, 1736, 1, - 0, 0, 0, 1737, 1738, 1, 0, 0, 0, 1738, 1741, 1, 0, 0, 0, 1739, 1740, 5, - 91, 0, 0, 1740, 1742, 3, 218, 109, 0, 1741, 1739, 1, 0, 0, 0, 1741, 1742, - 1, 0, 0, 0, 1742, 115, 1, 0, 0, 0, 1743, 1744, 5, 179, 0, 0, 1744, 1745, - 5, 3, 0, 0, 1745, 1746, 5, 149, 0, 0, 1746, 1747, 3, 68, 34, 0, 1747, 1748, - 5, 4, 0, 0, 1748, 117, 1, 0, 0, 0, 1749, 1751, 5, 3, 0, 0, 1750, 1752, - 3, 220, 110, 0, 1751, 1750, 1, 0, 0, 0, 1751, 1752, 1, 0, 0, 0, 1752, 1763, - 1, 0, 0, 0, 1753, 1754, 5, 154, 0, 0, 1754, 1755, 5, 40, 0, 0, 1755, 1760, - 3, 68, 34, 0, 1756, 1757, 5, 5, 0, 0, 1757, 1759, 3, 68, 34, 0, 1758, 1756, - 1, 0, 0, 0, 1759, 1762, 1, 0, 0, 0, 1760, 1758, 1, 0, 0, 0, 1760, 1761, - 1, 0, 0, 0, 1761, 1764, 1, 0, 0, 0, 1762, 1760, 1, 0, 0, 0, 1763, 1753, - 1, 0, 0, 0, 1763, 1764, 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, - 5, 109, 0, 0, 1766, 1767, 5, 40, 0, 0, 1767, 1772, 3, 138, 69, 0, 1768, - 1769, 5, 5, 0, 0, 1769, 1771, 3, 138, 69, 0, 1770, 1768, 1, 0, 0, 0, 1771, - 1774, 1, 0, 0, 0, 1772, 1770, 1, 0, 0, 0, 1772, 1773, 1, 0, 0, 0, 1773, - 1776, 1, 0, 0, 0, 1774, 1772, 1, 0, 0, 0, 1775, 1777, 3, 122, 61, 0, 1776, - 1775, 1, 0, 0, 0, 1776, 1777, 1, 0, 0, 0, 1777, 1778, 1, 0, 0, 0, 1778, - 1779, 5, 4, 0, 0, 1779, 119, 1, 0, 0, 0, 1780, 1814, 5, 153, 0, 0, 1781, - 1815, 3, 214, 107, 0, 1782, 1784, 5, 3, 0, 0, 1783, 1785, 3, 220, 110, - 0, 1784, 1783, 1, 0, 0, 0, 1784, 1785, 1, 0, 0, 0, 1785, 1796, 1, 0, 0, - 0, 1786, 1787, 5, 154, 0, 0, 1787, 1788, 5, 40, 0, 0, 1788, 1793, 3, 68, - 34, 0, 1789, 1790, 5, 5, 0, 0, 1790, 1792, 3, 68, 34, 0, 1791, 1789, 1, - 0, 0, 0, 1792, 1795, 1, 0, 0, 0, 1793, 1791, 1, 0, 0, 0, 1793, 1794, 1, - 0, 0, 0, 1794, 1797, 1, 0, 0, 0, 1795, 1793, 1, 0, 0, 0, 1796, 1786, 1, - 0, 0, 0, 1796, 1797, 1, 0, 0, 0, 1797, 1808, 1, 0, 0, 0, 1798, 1799, 5, - 109, 0, 0, 1799, 1800, 5, 40, 0, 0, 1800, 1805, 3, 138, 69, 0, 1801, 1802, - 5, 5, 0, 0, 1802, 1804, 3, 138, 69, 0, 1803, 1801, 1, 0, 0, 0, 1804, 1807, - 1, 0, 0, 0, 1805, 1803, 1, 0, 0, 0, 1805, 1806, 1, 0, 0, 0, 1806, 1809, - 1, 0, 0, 0, 1807, 1805, 1, 0, 0, 0, 1808, 1798, 1, 0, 0, 0, 1808, 1809, - 1, 0, 0, 0, 1809, 1811, 1, 0, 0, 0, 1810, 1812, 3, 122, 61, 0, 1811, 1810, - 1, 0, 0, 0, 1811, 1812, 1, 0, 0, 0, 1812, 1813, 1, 0, 0, 0, 1813, 1815, - 5, 4, 0, 0, 1814, 1781, 1, 0, 0, 0, 1814, 1782, 1, 0, 0, 0, 1815, 121, - 1, 0, 0, 0, 1816, 1824, 3, 124, 62, 0, 1817, 1818, 5, 181, 0, 0, 1818, - 1819, 5, 101, 0, 0, 1819, 1825, 5, 183, 0, 0, 1820, 1821, 5, 158, 0, 0, - 1821, 1825, 5, 127, 0, 0, 1822, 1825, 5, 78, 0, 0, 1823, 1825, 5, 182, - 0, 0, 1824, 1817, 1, 0, 0, 0, 1824, 1820, 1, 0, 0, 0, 1824, 1822, 1, 0, - 0, 0, 1824, 1823, 1, 0, 0, 0, 1824, 1825, 1, 0, 0, 0, 1825, 123, 1, 0, - 0, 0, 1826, 1833, 7, 18, 0, 0, 1827, 1834, 3, 146, 73, 0, 1828, 1829, 5, - 39, 0, 0, 1829, 1830, 3, 142, 71, 0, 1830, 1831, 5, 32, 0, 0, 1831, 1832, - 3, 144, 72, 0, 1832, 1834, 1, 0, 0, 0, 1833, 1827, 1, 0, 0, 0, 1833, 1828, - 1, 0, 0, 0, 1834, 125, 1, 0, 0, 0, 1835, 1836, 3, 222, 111, 0, 1836, 1846, - 5, 3, 0, 0, 1837, 1842, 3, 68, 34, 0, 1838, 1839, 5, 5, 0, 0, 1839, 1841, - 3, 68, 34, 0, 1840, 1838, 1, 0, 0, 0, 1841, 1844, 1, 0, 0, 0, 1842, 1840, - 1, 0, 0, 0, 1842, 1843, 1, 0, 0, 0, 1843, 1847, 1, 0, 0, 0, 1844, 1842, - 1, 0, 0, 0, 1845, 1847, 5, 7, 0, 0, 1846, 1837, 1, 0, 0, 0, 1846, 1845, - 1, 0, 0, 0, 1847, 1848, 1, 0, 0, 0, 1848, 1849, 5, 4, 0, 0, 1849, 127, - 1, 0, 0, 0, 1850, 1851, 3, 224, 112, 0, 1851, 1864, 5, 3, 0, 0, 1852, 1854, - 5, 62, 0, 0, 1853, 1852, 1, 0, 0, 0, 1853, 1854, 1, 0, 0, 0, 1854, 1855, - 1, 0, 0, 0, 1855, 1860, 3, 68, 34, 0, 1856, 1857, 5, 5, 0, 0, 1857, 1859, - 3, 68, 34, 0, 1858, 1856, 1, 0, 0, 0, 1859, 1862, 1, 0, 0, 0, 1860, 1858, - 1, 0, 0, 0, 1860, 1861, 1, 0, 0, 0, 1861, 1865, 1, 0, 0, 0, 1862, 1860, - 1, 0, 0, 0, 1863, 1865, 5, 7, 0, 0, 1864, 1853, 1, 0, 0, 0, 1864, 1863, - 1, 0, 0, 0, 1864, 1865, 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1868, - 5, 4, 0, 0, 1867, 1869, 3, 116, 58, 0, 1868, 1867, 1, 0, 0, 0, 1868, 1869, - 1, 0, 0, 0, 1869, 129, 1, 0, 0, 0, 1870, 1871, 3, 148, 74, 0, 1871, 1881, - 5, 3, 0, 0, 1872, 1877, 3, 68, 34, 0, 1873, 1874, 5, 5, 0, 0, 1874, 1876, - 3, 68, 34, 0, 1875, 1873, 1, 0, 0, 0, 1876, 1879, 1, 0, 0, 0, 1877, 1875, - 1, 0, 0, 0, 1877, 1878, 1, 0, 0, 0, 1878, 1882, 1, 0, 0, 0, 1879, 1877, - 1, 0, 0, 0, 1880, 1882, 5, 7, 0, 0, 1881, 1872, 1, 0, 0, 0, 1881, 1880, - 1, 0, 0, 0, 1881, 1882, 1, 0, 0, 0, 1882, 1883, 1, 0, 0, 0, 1883, 1885, - 5, 4, 0, 0, 1884, 1886, 3, 116, 58, 0, 1885, 1884, 1, 0, 0, 0, 1885, 1886, - 1, 0, 0, 0, 1886, 1887, 1, 0, 0, 0, 1887, 1890, 5, 153, 0, 0, 1888, 1891, - 3, 118, 59, 0, 1889, 1891, 3, 214, 107, 0, 1890, 1888, 1, 0, 0, 0, 1890, - 1889, 1, 0, 0, 0, 1891, 131, 1, 0, 0, 0, 1892, 1894, 5, 150, 0, 0, 1893, - 1895, 5, 116, 0, 0, 1894, 1893, 1, 0, 0, 0, 1894, 1895, 1, 0, 0, 0, 1895, - 1896, 1, 0, 0, 0, 1896, 1901, 3, 56, 28, 0, 1897, 1898, 5, 5, 0, 0, 1898, - 1900, 3, 56, 28, 0, 1899, 1897, 1, 0, 0, 0, 1900, 1903, 1, 0, 0, 0, 1901, - 1899, 1, 0, 0, 0, 1901, 1902, 1, 0, 0, 0, 1902, 133, 1, 0, 0, 0, 1903, - 1901, 1, 0, 0, 0, 1904, 1905, 5, 109, 0, 0, 1905, 1906, 5, 40, 0, 0, 1906, - 1911, 3, 138, 69, 0, 1907, 1908, 5, 5, 0, 0, 1908, 1910, 3, 138, 69, 0, - 1909, 1907, 1, 0, 0, 0, 1910, 1913, 1, 0, 0, 0, 1911, 1909, 1, 0, 0, 0, - 1911, 1912, 1, 0, 0, 0, 1912, 135, 1, 0, 0, 0, 1913, 1911, 1, 0, 0, 0, - 1914, 1915, 5, 98, 0, 0, 1915, 1918, 3, 68, 34, 0, 1916, 1917, 7, 19, 0, - 0, 1917, 1919, 3, 68, 34, 0, 1918, 1916, 1, 0, 0, 0, 1918, 1919, 1, 0, - 0, 0, 1919, 137, 1, 0, 0, 0, 1920, 1923, 3, 68, 34, 0, 1921, 1922, 5, 45, - 0, 0, 1922, 1924, 3, 192, 96, 0, 1923, 1921, 1, 0, 0, 0, 1923, 1924, 1, - 0, 0, 0, 1924, 1926, 1, 0, 0, 0, 1925, 1927, 3, 140, 70, 0, 1926, 1925, - 1, 0, 0, 0, 1926, 1927, 1, 0, 0, 0, 1927, 1930, 1, 0, 0, 0, 1928, 1929, - 5, 176, 0, 0, 1929, 1931, 7, 20, 0, 0, 1930, 1928, 1, 0, 0, 0, 1930, 1931, - 1, 0, 0, 0, 1931, 139, 1, 0, 0, 0, 1932, 1933, 7, 21, 0, 0, 1933, 141, - 1, 0, 0, 0, 1934, 1935, 3, 68, 34, 0, 1935, 1936, 5, 156, 0, 0, 1936, 1945, - 1, 0, 0, 0, 1937, 1938, 3, 68, 34, 0, 1938, 1939, 5, 159, 0, 0, 1939, 1945, - 1, 0, 0, 0, 1940, 1941, 5, 158, 0, 0, 1941, 1945, 5, 127, 0, 0, 1942, 1943, - 5, 157, 0, 0, 1943, 1945, 5, 156, 0, 0, 1944, 1934, 1, 0, 0, 0, 1944, 1937, - 1, 0, 0, 0, 1944, 1940, 1, 0, 0, 0, 1944, 1942, 1, 0, 0, 0, 1945, 143, - 1, 0, 0, 0, 1946, 1947, 3, 68, 34, 0, 1947, 1948, 5, 156, 0, 0, 1948, 1957, - 1, 0, 0, 0, 1949, 1950, 3, 68, 34, 0, 1950, 1951, 5, 159, 0, 0, 1951, 1957, - 1, 0, 0, 0, 1952, 1953, 5, 158, 0, 0, 1953, 1957, 5, 127, 0, 0, 1954, 1955, - 5, 157, 0, 0, 1955, 1957, 5, 159, 0, 0, 1956, 1946, 1, 0, 0, 0, 1956, 1949, - 1, 0, 0, 0, 1956, 1952, 1, 0, 0, 0, 1956, 1954, 1, 0, 0, 0, 1957, 145, - 1, 0, 0, 0, 1958, 1959, 3, 68, 34, 0, 1959, 1960, 5, 156, 0, 0, 1960, 1966, - 1, 0, 0, 0, 1961, 1962, 5, 157, 0, 0, 1962, 1966, 5, 156, 0, 0, 1963, 1964, - 5, 158, 0, 0, 1964, 1966, 5, 127, 0, 0, 1965, 1958, 1, 0, 0, 0, 1965, 1961, - 1, 0, 0, 0, 1965, 1963, 1, 0, 0, 0, 1966, 147, 1, 0, 0, 0, 1967, 1968, - 7, 22, 0, 0, 1968, 1969, 5, 3, 0, 0, 1969, 1970, 3, 68, 34, 0, 1970, 1971, - 5, 4, 0, 0, 1971, 1972, 5, 153, 0, 0, 1972, 1974, 5, 3, 0, 0, 1973, 1975, - 3, 154, 77, 0, 1974, 1973, 1, 0, 0, 0, 1974, 1975, 1, 0, 0, 0, 1975, 1976, - 1, 0, 0, 0, 1976, 1978, 3, 158, 79, 0, 1977, 1979, 3, 124, 62, 0, 1978, - 1977, 1, 0, 0, 0, 1978, 1979, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, - 1981, 5, 4, 0, 0, 1981, 2053, 1, 0, 0, 0, 1982, 1983, 7, 23, 0, 0, 1983, - 1984, 5, 3, 0, 0, 1984, 1985, 5, 4, 0, 0, 1985, 1986, 5, 153, 0, 0, 1986, - 1988, 5, 3, 0, 0, 1987, 1989, 3, 154, 77, 0, 1988, 1987, 1, 0, 0, 0, 1988, - 1989, 1, 0, 0, 0, 1989, 1991, 1, 0, 0, 0, 1990, 1992, 3, 156, 78, 0, 1991, - 1990, 1, 0, 0, 0, 1991, 1992, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, - 2053, 5, 4, 0, 0, 1994, 1995, 7, 24, 0, 0, 1995, 1996, 5, 3, 0, 0, 1996, - 1997, 5, 4, 0, 0, 1997, 1998, 5, 153, 0, 0, 1998, 2000, 5, 3, 0, 0, 1999, - 2001, 3, 154, 77, 0, 2000, 1999, 1, 0, 0, 0, 2000, 2001, 1, 0, 0, 0, 2001, - 2002, 1, 0, 0, 0, 2002, 2003, 3, 158, 79, 0, 2003, 2004, 5, 4, 0, 0, 2004, - 2053, 1, 0, 0, 0, 2005, 2006, 7, 25, 0, 0, 2006, 2007, 5, 3, 0, 0, 2007, - 2009, 3, 68, 34, 0, 2008, 2010, 3, 150, 75, 0, 2009, 2008, 1, 0, 0, 0, - 2009, 2010, 1, 0, 0, 0, 2010, 2012, 1, 0, 0, 0, 2011, 2013, 3, 152, 76, - 0, 2012, 2011, 1, 0, 0, 0, 2012, 2013, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, - 0, 2014, 2015, 5, 4, 0, 0, 2015, 2016, 5, 153, 0, 0, 2016, 2018, 5, 3, - 0, 0, 2017, 2019, 3, 154, 77, 0, 2018, 2017, 1, 0, 0, 0, 2018, 2019, 1, - 0, 0, 0, 2019, 2020, 1, 0, 0, 0, 2020, 2021, 3, 158, 79, 0, 2021, 2022, - 5, 4, 0, 0, 2022, 2053, 1, 0, 0, 0, 2023, 2024, 5, 165, 0, 0, 2024, 2025, - 5, 3, 0, 0, 2025, 2026, 3, 68, 34, 0, 2026, 2027, 5, 5, 0, 0, 2027, 2028, - 3, 36, 18, 0, 2028, 2029, 5, 4, 0, 0, 2029, 2030, 5, 153, 0, 0, 2030, 2032, - 5, 3, 0, 0, 2031, 2033, 3, 154, 77, 0, 2032, 2031, 1, 0, 0, 0, 2032, 2033, - 1, 0, 0, 0, 2033, 2034, 1, 0, 0, 0, 2034, 2036, 3, 158, 79, 0, 2035, 2037, - 3, 124, 62, 0, 2036, 2035, 1, 0, 0, 0, 2036, 2037, 1, 0, 0, 0, 2037, 2038, - 1, 0, 0, 0, 2038, 2039, 5, 4, 0, 0, 2039, 2053, 1, 0, 0, 0, 2040, 2041, - 5, 166, 0, 0, 2041, 2042, 5, 3, 0, 0, 2042, 2043, 3, 68, 34, 0, 2043, 2044, - 5, 4, 0, 0, 2044, 2045, 5, 153, 0, 0, 2045, 2047, 5, 3, 0, 0, 2046, 2048, - 3, 154, 77, 0, 2047, 2046, 1, 0, 0, 0, 2047, 2048, 1, 0, 0, 0, 2048, 2049, - 1, 0, 0, 0, 2049, 2050, 3, 158, 79, 0, 2050, 2051, 5, 4, 0, 0, 2051, 2053, - 1, 0, 0, 0, 2052, 1967, 1, 0, 0, 0, 2052, 1982, 1, 0, 0, 0, 2052, 1994, - 1, 0, 0, 0, 2052, 2005, 1, 0, 0, 0, 2052, 2023, 1, 0, 0, 0, 2052, 2040, - 1, 0, 0, 0, 2053, 149, 1, 0, 0, 0, 2054, 2055, 5, 5, 0, 0, 2055, 2056, - 3, 36, 18, 0, 2056, 151, 1, 0, 0, 0, 2057, 2058, 5, 5, 0, 0, 2058, 2059, - 3, 36, 18, 0, 2059, 153, 1, 0, 0, 0, 2060, 2061, 5, 154, 0, 0, 2061, 2063, - 5, 40, 0, 0, 2062, 2064, 3, 68, 34, 0, 2063, 2062, 1, 0, 0, 0, 2064, 2065, - 1, 0, 0, 0, 2065, 2063, 1, 0, 0, 0, 2065, 2066, 1, 0, 0, 0, 2066, 155, - 1, 0, 0, 0, 2067, 2068, 5, 109, 0, 0, 2068, 2070, 5, 40, 0, 0, 2069, 2071, - 3, 68, 34, 0, 2070, 2069, 1, 0, 0, 0, 2071, 2072, 1, 0, 0, 0, 2072, 2070, - 1, 0, 0, 0, 2072, 2073, 1, 0, 0, 0, 2073, 157, 1, 0, 0, 0, 2074, 2075, - 5, 109, 0, 0, 2075, 2076, 5, 40, 0, 0, 2076, 2077, 3, 158, 79, 0, 2077, - 159, 1, 0, 0, 0, 2078, 2080, 3, 68, 34, 0, 2079, 2081, 3, 140, 70, 0, 2080, - 2079, 1, 0, 0, 0, 2080, 2081, 1, 0, 0, 0, 2081, 2089, 1, 0, 0, 0, 2082, - 2083, 5, 5, 0, 0, 2083, 2085, 3, 68, 34, 0, 2084, 2086, 3, 140, 70, 0, - 2085, 2084, 1, 0, 0, 0, 2085, 2086, 1, 0, 0, 0, 2086, 2088, 1, 0, 0, 0, - 2087, 2082, 1, 0, 0, 0, 2088, 2091, 1, 0, 0, 0, 2089, 2087, 1, 0, 0, 0, - 2089, 2090, 1, 0, 0, 0, 2090, 161, 1, 0, 0, 0, 2091, 2089, 1, 0, 0, 0, - 2092, 2093, 3, 84, 42, 0, 2093, 163, 1, 0, 0, 0, 2094, 2095, 3, 84, 42, - 0, 2095, 165, 1, 0, 0, 0, 2096, 2097, 7, 26, 0, 0, 2097, 167, 1, 0, 0, - 0, 2098, 2099, 5, 190, 0, 0, 2099, 169, 1, 0, 0, 0, 2100, 2103, 3, 68, - 34, 0, 2101, 2103, 3, 30, 15, 0, 2102, 2100, 1, 0, 0, 0, 2102, 2101, 1, - 0, 0, 0, 2103, 171, 1, 0, 0, 0, 2104, 2105, 7, 27, 0, 0, 2105, 173, 1, - 0, 0, 0, 2106, 2107, 7, 28, 0, 0, 2107, 175, 1, 0, 0, 0, 2108, 2109, 3, - 228, 114, 0, 2109, 177, 1, 0, 0, 0, 2110, 2111, 3, 228, 114, 0, 2111, 179, - 1, 0, 0, 0, 2112, 2113, 3, 182, 91, 0, 2113, 2114, 5, 2, 0, 0, 2114, 2116, - 1, 0, 0, 0, 2115, 2112, 1, 0, 0, 0, 2115, 2116, 1, 0, 0, 0, 2116, 2117, - 1, 0, 0, 0, 2117, 2118, 3, 178, 89, 0, 2118, 181, 1, 0, 0, 0, 2119, 2120, - 3, 228, 114, 0, 2120, 183, 1, 0, 0, 0, 2121, 2122, 3, 228, 114, 0, 2122, - 185, 1, 0, 0, 0, 2123, 2124, 3, 228, 114, 0, 2124, 187, 1, 0, 0, 0, 2125, - 2126, 3, 228, 114, 0, 2126, 189, 1, 0, 0, 0, 2127, 2128, 3, 228, 114, 0, - 2128, 191, 1, 0, 0, 0, 2129, 2130, 3, 228, 114, 0, 2130, 193, 1, 0, 0, - 0, 2131, 2132, 3, 228, 114, 0, 2132, 195, 1, 0, 0, 0, 2133, 2134, 3, 228, - 114, 0, 2134, 197, 1, 0, 0, 0, 2135, 2136, 3, 228, 114, 0, 2136, 199, 1, - 0, 0, 0, 2137, 2138, 3, 228, 114, 0, 2138, 201, 1, 0, 0, 0, 2139, 2140, - 3, 228, 114, 0, 2140, 203, 1, 0, 0, 0, 2141, 2142, 3, 228, 114, 0, 2142, - 205, 1, 0, 0, 0, 2143, 2144, 3, 228, 114, 0, 2144, 207, 1, 0, 0, 0, 2145, - 2146, 7, 27, 0, 0, 2146, 209, 1, 0, 0, 0, 2147, 2148, 3, 228, 114, 0, 2148, - 211, 1, 0, 0, 0, 2149, 2150, 3, 228, 114, 0, 2150, 213, 1, 0, 0, 0, 2151, - 2152, 3, 228, 114, 0, 2152, 215, 1, 0, 0, 0, 2153, 2154, 3, 228, 114, 0, - 2154, 217, 1, 0, 0, 0, 2155, 2156, 3, 228, 114, 0, 2156, 219, 1, 0, 0, - 0, 2157, 2158, 3, 228, 114, 0, 2158, 221, 1, 0, 0, 0, 2159, 2160, 3, 228, - 114, 0, 2160, 223, 1, 0, 0, 0, 2161, 2162, 3, 228, 114, 0, 2162, 225, 1, - 0, 0, 0, 2163, 2164, 3, 228, 114, 0, 2164, 227, 1, 0, 0, 0, 2165, 2173, - 5, 186, 0, 0, 2166, 2173, 3, 174, 87, 0, 2167, 2173, 5, 190, 0, 0, 2168, - 2169, 5, 3, 0, 0, 2169, 2170, 3, 228, 114, 0, 2170, 2171, 5, 4, 0, 0, 2171, - 2173, 1, 0, 0, 0, 2172, 2165, 1, 0, 0, 0, 2172, 2166, 1, 0, 0, 0, 2172, - 2167, 1, 0, 0, 0, 2172, 2168, 1, 0, 0, 0, 2173, 229, 1, 0, 0, 0, 314, 233, + 224, 226, 228, 0, 30, 3, 0, 60, 60, 71, 71, 84, 84, 2, 0, 49, 49, 68, 68, + 1, 0, 136, 137, 2, 0, 149, 149, 174, 174, 2, 0, 8, 8, 11, 11, 2, 0, 61, + 61, 144, 144, 2, 0, 58, 58, 106, 106, 2, 0, 60, 60, 84, 84, 5, 0, 27, 27, + 74, 74, 83, 83, 124, 124, 128, 128, 4, 0, 86, 86, 135, 135, 141, 141, 148, + 148, 1, 0, 9, 10, 2, 0, 7, 7, 14, 15, 1, 0, 16, 19, 1, 0, 20, 23, 4, 0, + 79, 79, 99, 99, 101, 101, 120, 120, 3, 0, 27, 27, 74, 74, 128, 128, 5, + 0, 54, 56, 106, 106, 175, 176, 189, 189, 192, 193, 2, 0, 31, 31, 64, 64, + 3, 0, 78, 78, 98, 98, 127, 127, 3, 0, 130, 130, 157, 157, 182, 182, 2, + 0, 5, 5, 108, 108, 1, 0, 179, 180, 2, 0, 36, 36, 62, 62, 2, 0, 154, 154, + 165, 165, 2, 0, 162, 162, 169, 169, 2, 0, 163, 163, 170, 171, 2, 0, 164, + 164, 166, 166, 3, 0, 8, 8, 11, 12, 104, 104, 2, 0, 188, 188, 192, 192, + 1, 0, 27, 183, 2482, 0, 233, 1, 0, 0, 0, 2, 241, 1, 0, 0, 0, 4, 267, 1, + 0, 0, 0, 6, 295, 1, 0, 0, 0, 8, 327, 1, 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, + 345, 1, 0, 0, 0, 14, 355, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 370, 1, + 0, 0, 0, 20, 373, 1, 0, 0, 0, 22, 379, 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, + 26, 425, 1, 0, 0, 0, 28, 427, 1, 0, 0, 0, 30, 474, 1, 0, 0, 0, 32, 485, + 1, 0, 0, 0, 34, 503, 1, 0, 0, 0, 36, 555, 1, 0, 0, 0, 38, 561, 1, 0, 0, + 0, 40, 602, 1, 0, 0, 0, 42, 644, 1, 0, 0, 0, 44, 648, 1, 0, 0, 0, 46, 712, + 1, 0, 0, 0, 48, 744, 1, 0, 0, 0, 50, 773, 1, 0, 0, 0, 52, 794, 1, 0, 0, + 0, 54, 808, 1, 0, 0, 0, 56, 819, 1, 0, 0, 0, 58, 838, 1, 0, 0, 0, 60, 866, + 1, 0, 0, 0, 62, 879, 1, 0, 0, 0, 64, 897, 1, 0, 0, 0, 66, 903, 1, 0, 0, + 0, 68, 1005, 1, 0, 0, 0, 70, 1129, 1, 0, 0, 0, 72, 1139, 1, 0, 0, 0, 74, + 1142, 1, 0, 0, 0, 76, 1214, 1, 0, 0, 0, 78, 1261, 1, 0, 0, 0, 80, 1279, + 1, 0, 0, 0, 82, 1281, 1, 0, 0, 0, 84, 1295, 1, 0, 0, 0, 86, 1312, 1, 0, + 0, 0, 88, 1412, 1, 0, 0, 0, 90, 1414, 1, 0, 0, 0, 92, 1417, 1, 0, 0, 0, + 94, 1427, 1, 0, 0, 0, 96, 1577, 1, 0, 0, 0, 98, 1591, 1, 0, 0, 0, 100, + 1607, 1, 0, 0, 0, 102, 1623, 1, 0, 0, 0, 104, 1631, 1, 0, 0, 0, 106, 1634, + 1, 0, 0, 0, 108, 1669, 1, 0, 0, 0, 110, 1681, 1, 0, 0, 0, 112, 1722, 1, + 0, 0, 0, 114, 1736, 1, 0, 0, 0, 116, 1744, 1, 0, 0, 0, 118, 1750, 1, 0, + 0, 0, 120, 1781, 1, 0, 0, 0, 122, 1817, 1, 0, 0, 0, 124, 1827, 1, 0, 0, + 0, 126, 1836, 1, 0, 0, 0, 128, 1851, 1, 0, 0, 0, 130, 1871, 1, 0, 0, 0, + 132, 1893, 1, 0, 0, 0, 134, 1905, 1, 0, 0, 0, 136, 1915, 1, 0, 0, 0, 138, + 1921, 1, 0, 0, 0, 140, 1933, 1, 0, 0, 0, 142, 1945, 1, 0, 0, 0, 144, 1957, + 1, 0, 0, 0, 146, 1966, 1, 0, 0, 0, 148, 2053, 1, 0, 0, 0, 150, 2055, 1, + 0, 0, 0, 152, 2058, 1, 0, 0, 0, 154, 2061, 1, 0, 0, 0, 156, 2068, 1, 0, + 0, 0, 158, 2075, 1, 0, 0, 0, 160, 2079, 1, 0, 0, 0, 162, 2093, 1, 0, 0, + 0, 164, 2095, 1, 0, 0, 0, 166, 2097, 1, 0, 0, 0, 168, 2099, 1, 0, 0, 0, + 170, 2103, 1, 0, 0, 0, 172, 2105, 1, 0, 0, 0, 174, 2107, 1, 0, 0, 0, 176, + 2109, 1, 0, 0, 0, 178, 2111, 1, 0, 0, 0, 180, 2116, 1, 0, 0, 0, 182, 2120, + 1, 0, 0, 0, 184, 2122, 1, 0, 0, 0, 186, 2124, 1, 0, 0, 0, 188, 2126, 1, + 0, 0, 0, 190, 2128, 1, 0, 0, 0, 192, 2130, 1, 0, 0, 0, 194, 2132, 1, 0, + 0, 0, 196, 2134, 1, 0, 0, 0, 198, 2136, 1, 0, 0, 0, 200, 2138, 1, 0, 0, + 0, 202, 2140, 1, 0, 0, 0, 204, 2142, 1, 0, 0, 0, 206, 2144, 1, 0, 0, 0, + 208, 2146, 1, 0, 0, 0, 210, 2148, 1, 0, 0, 0, 212, 2150, 1, 0, 0, 0, 214, + 2152, 1, 0, 0, 0, 216, 2154, 1, 0, 0, 0, 218, 2156, 1, 0, 0, 0, 220, 2158, + 1, 0, 0, 0, 222, 2160, 1, 0, 0, 0, 224, 2162, 1, 0, 0, 0, 226, 2164, 1, + 0, 0, 0, 228, 2173, 1, 0, 0, 0, 230, 232, 3, 2, 1, 0, 231, 230, 1, 0, 0, + 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, + 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 0, 0, 1, 237, 1, 1, + 0, 0, 0, 238, 240, 5, 1, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, + 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, + 241, 1, 0, 0, 0, 244, 253, 3, 4, 2, 0, 245, 247, 5, 1, 0, 0, 246, 245, + 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, + 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 3, 4, 2, 0, 251, 246, 1, 0, 0, 0, + 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, + 259, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 258, 5, 1, 0, 0, 257, 256, + 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, + 0, 0, 260, 3, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 265, 5, 73, 0, 0, + 263, 264, 5, 116, 0, 0, 264, 266, 5, 113, 0, 0, 265, 263, 1, 0, 0, 0, 265, + 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, 267, 262, 1, 0, 0, 0, 267, 268, + 1, 0, 0, 0, 268, 293, 1, 0, 0, 0, 269, 294, 3, 6, 3, 0, 270, 294, 3, 8, + 4, 0, 271, 294, 3, 10, 5, 0, 272, 294, 3, 12, 6, 0, 273, 294, 3, 14, 7, + 0, 274, 294, 3, 22, 11, 0, 275, 294, 3, 28, 14, 0, 276, 294, 3, 44, 22, + 0, 277, 294, 3, 46, 23, 0, 278, 294, 3, 48, 24, 0, 279, 294, 3, 60, 30, + 0, 280, 294, 3, 62, 31, 0, 281, 294, 3, 64, 32, 0, 282, 294, 3, 66, 33, + 0, 283, 294, 3, 74, 37, 0, 284, 294, 3, 78, 39, 0, 285, 294, 3, 82, 41, + 0, 286, 294, 3, 20, 10, 0, 287, 294, 3, 16, 8, 0, 288, 294, 3, 18, 9, 0, + 289, 294, 3, 84, 42, 0, 290, 294, 3, 106, 53, 0, 291, 294, 3, 110, 55, + 0, 292, 294, 3, 114, 57, 0, 293, 269, 1, 0, 0, 0, 293, 270, 1, 0, 0, 0, + 293, 271, 1, 0, 0, 0, 293, 272, 1, 0, 0, 0, 293, 273, 1, 0, 0, 0, 293, + 274, 1, 0, 0, 0, 293, 275, 1, 0, 0, 0, 293, 276, 1, 0, 0, 0, 293, 277, + 1, 0, 0, 0, 293, 278, 1, 0, 0, 0, 293, 279, 1, 0, 0, 0, 293, 280, 1, 0, + 0, 0, 293, 281, 1, 0, 0, 0, 293, 282, 1, 0, 0, 0, 293, 283, 1, 0, 0, 0, + 293, 284, 1, 0, 0, 0, 293, 285, 1, 0, 0, 0, 293, 286, 1, 0, 0, 0, 293, + 287, 1, 0, 0, 0, 293, 288, 1, 0, 0, 0, 293, 289, 1, 0, 0, 0, 293, 290, + 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 294, 5, 1, 0, 0, + 0, 295, 296, 5, 32, 0, 0, 296, 300, 5, 135, 0, 0, 297, 298, 3, 182, 91, + 0, 298, 299, 5, 2, 0, 0, 299, 301, 1, 0, 0, 0, 300, 297, 1, 0, 0, 0, 300, + 301, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 325, 3, 184, 92, 0, 303, 313, + 5, 123, 0, 0, 304, 305, 5, 139, 0, 0, 305, 314, 3, 188, 94, 0, 306, 308, + 5, 48, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, + 0, 0, 309, 310, 3, 190, 95, 0, 310, 311, 5, 139, 0, 0, 311, 312, 3, 190, + 95, 0, 312, 314, 1, 0, 0, 0, 313, 304, 1, 0, 0, 0, 313, 307, 1, 0, 0, 0, + 314, 326, 1, 0, 0, 0, 315, 317, 5, 29, 0, 0, 316, 318, 5, 48, 0, 0, 317, + 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 326, + 3, 30, 15, 0, 320, 322, 5, 65, 0, 0, 321, 323, 5, 48, 0, 0, 322, 321, 1, + 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 326, 3, 190, + 95, 0, 325, 303, 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, 325, 320, 1, 0, 0, 0, + 326, 7, 1, 0, 0, 0, 327, 335, 5, 33, 0, 0, 328, 336, 3, 182, 91, 0, 329, + 330, 3, 182, 91, 0, 330, 331, 5, 2, 0, 0, 331, 333, 1, 0, 0, 0, 332, 329, + 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 3, 186, + 93, 0, 335, 328, 1, 0, 0, 0, 335, 332, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, + 336, 9, 1, 0, 0, 0, 337, 339, 5, 37, 0, 0, 338, 340, 5, 57, 0, 0, 339, + 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, + 3, 68, 34, 0, 342, 343, 5, 35, 0, 0, 343, 344, 3, 182, 91, 0, 344, 11, + 1, 0, 0, 0, 345, 347, 5, 40, 0, 0, 346, 348, 7, 0, 0, 0, 347, 346, 1, 0, + 0, 0, 347, 348, 1, 0, 0, 0, 348, 353, 1, 0, 0, 0, 349, 351, 5, 140, 0, + 0, 350, 352, 3, 212, 106, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, + 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, + 13, 1, 0, 0, 0, 355, 357, 7, 1, 0, 0, 356, 358, 5, 140, 0, 0, 357, 356, + 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 15, 1, 0, 0, 0, 359, 361, 5, 128, + 0, 0, 360, 362, 5, 140, 0, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, + 0, 362, 368, 1, 0, 0, 0, 363, 365, 5, 139, 0, 0, 364, 366, 5, 131, 0, 0, + 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, + 369, 3, 206, 103, 0, 368, 363, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 17, + 1, 0, 0, 0, 370, 371, 5, 131, 0, 0, 371, 372, 3, 206, 103, 0, 372, 19, + 1, 0, 0, 0, 373, 375, 5, 122, 0, 0, 374, 376, 5, 131, 0, 0, 375, 374, 1, + 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 3, 206, + 103, 0, 378, 21, 1, 0, 0, 0, 379, 381, 5, 52, 0, 0, 380, 382, 5, 143, 0, + 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, + 387, 5, 86, 0, 0, 384, 385, 5, 82, 0, 0, 385, 386, 5, 104, 0, 0, 386, 388, + 5, 72, 0, 0, 387, 384, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 392, 1, 0, + 0, 0, 389, 390, 3, 182, 91, 0, 390, 391, 5, 2, 0, 0, 391, 393, 1, 0, 0, + 0, 392, 389, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, + 395, 3, 196, 98, 0, 395, 396, 5, 109, 0, 0, 396, 397, 3, 184, 92, 0, 397, + 398, 5, 3, 0, 0, 398, 403, 3, 24, 12, 0, 399, 400, 5, 5, 0, 0, 400, 402, + 3, 24, 12, 0, 401, 399, 1, 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, + 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, + 0, 406, 409, 5, 4, 0, 0, 407, 408, 5, 151, 0, 0, 408, 410, 3, 68, 34, 0, + 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 23, 1, 0, 0, 0, 411, 414, + 3, 190, 95, 0, 412, 414, 3, 68, 34, 0, 413, 411, 1, 0, 0, 0, 413, 412, + 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 416, 5, 47, 0, 0, 416, 418, 3, 192, + 96, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, + 419, 421, 3, 140, 70, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, + 25, 1, 0, 0, 0, 422, 423, 5, 153, 0, 0, 423, 426, 5, 188, 0, 0, 424, 426, + 5, 134, 0, 0, 425, 422, 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 27, 1, 0, + 0, 0, 427, 429, 5, 52, 0, 0, 428, 430, 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, + 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 435, 5, 135, 0, 0, 432, + 433, 5, 82, 0, 0, 433, 434, 5, 104, 0, 0, 434, 436, 5, 72, 0, 0, 435, 432, + 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, + 91, 0, 438, 439, 5, 2, 0, 0, 439, 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, + 440, 441, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, + 444, 5, 3, 0, 0, 444, 449, 3, 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, + 3, 30, 15, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, + 0, 0, 0, 449, 447, 1, 0, 0, 0, 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, + 0, 452, 453, 5, 5, 0, 0, 453, 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, + 455, 458, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, + 459, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, + 3, 26, 13, 0, 461, 462, 5, 5, 0, 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, + 0, 0, 0, 464, 467, 1, 0, 0, 0, 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, + 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, + 469, 1, 0, 0, 0, 469, 473, 1, 0, 0, 0, 470, 471, 5, 35, 0, 0, 471, 473, + 3, 84, 42, 0, 472, 443, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, + 0, 0, 474, 476, 3, 190, 95, 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, + 0, 0, 476, 477, 1, 0, 0, 0, 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, + 0, 479, 478, 1, 0, 0, 0, 480, 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, + 482, 1, 0, 0, 0, 482, 31, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, + 176, 88, 0, 485, 484, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, + 0, 0, 487, 485, 1, 0, 0, 0, 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, + 490, 491, 3, 36, 18, 0, 491, 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, + 494, 5, 3, 0, 0, 494, 495, 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, + 3, 36, 18, 0, 497, 498, 5, 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, + 0, 0, 0, 499, 493, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, + 0, 501, 502, 5, 51, 0, 0, 502, 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, + 503, 504, 1, 0, 0, 0, 504, 552, 1, 0, 0, 0, 505, 506, 5, 115, 0, 0, 506, + 508, 5, 97, 0, 0, 507, 509, 3, 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, + 1, 0, 0, 0, 509, 511, 1, 0, 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, + 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 38, 0, + 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, + 517, 5, 104, 0, 0, 517, 520, 5, 106, 0, 0, 518, 520, 5, 143, 0, 0, 519, + 516, 1, 0, 0, 0, 519, 518, 1, 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, + 3, 42, 21, 0, 522, 521, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, + 0, 0, 0, 524, 525, 5, 46, 0, 0, 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, + 34, 0, 527, 528, 5, 4, 0, 0, 528, 553, 1, 0, 0, 0, 529, 536, 5, 58, 0, + 0, 530, 537, 3, 36, 18, 0, 531, 537, 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, + 533, 534, 3, 68, 34, 0, 534, 535, 5, 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, + 530, 1, 0, 0, 0, 536, 531, 1, 0, 0, 0, 536, 532, 1, 0, 0, 0, 537, 553, + 1, 0, 0, 0, 538, 539, 5, 47, 0, 0, 539, 553, 3, 192, 96, 0, 540, 553, 3, + 40, 20, 0, 541, 542, 5, 172, 0, 0, 542, 544, 5, 173, 0, 0, 543, 541, 1, + 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 5, 35, 0, + 0, 546, 547, 5, 3, 0, 0, 547, 548, 3, 68, 34, 0, 548, 550, 5, 4, 0, 0, + 549, 551, 7, 3, 0, 0, 550, 549, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, + 553, 1, 0, 0, 0, 552, 505, 1, 0, 0, 0, 552, 519, 1, 0, 0, 0, 552, 524, + 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552, 538, 1, 0, 0, 0, 552, 540, 1, 0, + 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1, 0, 0, 0, 554, 556, 7, 4, 0, 0, + 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, + 558, 5, 189, 0, 0, 558, 37, 1, 0, 0, 0, 559, 560, 5, 51, 0, 0, 560, 562, + 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 600, 1, + 0, 0, 0, 563, 564, 5, 115, 0, 0, 564, 567, 5, 97, 0, 0, 565, 567, 5, 143, + 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, + 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12, 0, 570, 571, 5, 5, 0, 0, 571, + 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0, 573, 576, 1, 0, 0, 0, 574, 572, + 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 577, 1, 0, 0, 0, 576, 574, 1, 0, + 0, 0, 577, 579, 5, 4, 0, 0, 578, 580, 3, 42, 21, 0, 579, 578, 1, 0, 0, + 0, 579, 580, 1, 0, 0, 0, 580, 601, 1, 0, 0, 0, 581, 582, 5, 46, 0, 0, 582, + 583, 5, 3, 0, 0, 583, 584, 3, 68, 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, + 1, 0, 0, 0, 586, 587, 5, 76, 0, 0, 587, 588, 5, 97, 0, 0, 588, 589, 5, + 3, 0, 0, 589, 594, 3, 190, 95, 0, 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, + 95, 0, 592, 590, 1, 0, 0, 0, 593, 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, + 594, 595, 1, 0, 0, 0, 595, 597, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, + 598, 5, 4, 0, 0, 598, 599, 3, 40, 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, + 1, 0, 0, 0, 600, 581, 1, 0, 0, 0, 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, + 0, 0, 602, 603, 5, 119, 0, 0, 603, 615, 3, 194, 97, 0, 604, 605, 5, 3, + 0, 0, 605, 610, 3, 190, 95, 0, 606, 607, 5, 5, 0, 0, 607, 609, 3, 190, + 95, 0, 608, 606, 1, 0, 0, 0, 609, 612, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, + 610, 611, 1, 0, 0, 0, 611, 613, 1, 0, 0, 0, 612, 610, 1, 0, 0, 0, 613, + 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0, 615, 604, 1, 0, 0, 0, 615, 616, + 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617, 618, 5, 109, 0, 0, 618, 625, 7, + 5, 0, 0, 619, 620, 5, 133, 0, 0, 620, 626, 7, 6, 0, 0, 621, 626, 5, 43, + 0, 0, 622, 626, 5, 125, 0, 0, 623, 624, 5, 103, 0, 0, 624, 626, 5, 28, + 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0, 0, 0, 625, 622, 1, 0, 0, 0, + 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0, 627, 628, 5, 101, 0, 0, 628, + 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 633, + 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 642, 1, 0, + 0, 0, 633, 631, 1, 0, 0, 0, 634, 636, 5, 104, 0, 0, 635, 634, 1, 0, 0, + 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 640, 5, 59, 0, 0, 638, + 639, 5, 88, 0, 0, 639, 641, 7, 7, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, + 1, 0, 0, 0, 641, 643, 1, 0, 0, 0, 642, 635, 1, 0, 0, 0, 642, 643, 1, 0, + 0, 0, 643, 41, 1, 0, 0, 0, 644, 645, 5, 109, 0, 0, 645, 646, 5, 50, 0, + 0, 646, 647, 7, 8, 0, 0, 647, 43, 1, 0, 0, 0, 648, 650, 5, 52, 0, 0, 649, + 651, 7, 2, 0, 0, 650, 649, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 652, + 1, 0, 0, 0, 652, 656, 5, 141, 0, 0, 653, 654, 5, 82, 0, 0, 654, 655, 5, + 104, 0, 0, 655, 657, 5, 72, 0, 0, 656, 653, 1, 0, 0, 0, 656, 657, 1, 0, + 0, 0, 657, 661, 1, 0, 0, 0, 658, 659, 3, 182, 91, 0, 659, 660, 5, 2, 0, + 0, 660, 662, 1, 0, 0, 0, 661, 658, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, + 663, 1, 0, 0, 0, 663, 668, 3, 198, 99, 0, 664, 669, 5, 39, 0, 0, 665, 669, + 5, 30, 0, 0, 666, 667, 5, 91, 0, 0, 667, 669, 5, 107, 0, 0, 668, 664, 1, + 0, 0, 0, 668, 665, 1, 0, 0, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, + 0, 669, 684, 1, 0, 0, 0, 670, 685, 5, 61, 0, 0, 671, 685, 5, 90, 0, 0, + 672, 682, 5, 144, 0, 0, 673, 674, 5, 107, 0, 0, 674, 679, 3, 190, 95, 0, + 675, 676, 5, 5, 0, 0, 676, 678, 3, 190, 95, 0, 677, 675, 1, 0, 0, 0, 678, + 681, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 683, + 1, 0, 0, 0, 681, 679, 1, 0, 0, 0, 682, 673, 1, 0, 0, 0, 682, 683, 1, 0, + 0, 0, 683, 685, 1, 0, 0, 0, 684, 670, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, + 684, 672, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, 686, 687, 5, 109, 0, 0, 687, + 691, 3, 184, 92, 0, 688, 689, 5, 75, 0, 0, 689, 690, 5, 66, 0, 0, 690, + 692, 5, 129, 0, 0, 691, 688, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 695, + 1, 0, 0, 0, 693, 694, 5, 150, 0, 0, 694, 696, 3, 68, 34, 0, 695, 693, 1, + 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 697, 1, 0, 0, 0, 697, 706, 5, 40, 0, + 0, 698, 703, 3, 106, 53, 0, 699, 703, 3, 74, 37, 0, 700, 703, 3, 60, 30, + 0, 701, 703, 3, 84, 42, 0, 702, 698, 1, 0, 0, 0, 702, 699, 1, 0, 0, 0, + 702, 700, 1, 0, 0, 0, 702, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, + 705, 5, 1, 0, 0, 705, 707, 1, 0, 0, 0, 706, 702, 1, 0, 0, 0, 707, 708, + 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 1, 0, + 0, 0, 710, 711, 5, 68, 0, 0, 711, 45, 1, 0, 0, 0, 712, 714, 5, 52, 0, 0, + 713, 715, 7, 2, 0, 0, 714, 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, + 716, 1, 0, 0, 0, 716, 720, 5, 148, 0, 0, 717, 718, 5, 82, 0, 0, 718, 719, + 5, 104, 0, 0, 719, 721, 5, 72, 0, 0, 720, 717, 1, 0, 0, 0, 720, 721, 1, + 0, 0, 0, 721, 725, 1, 0, 0, 0, 722, 723, 3, 182, 91, 0, 723, 724, 5, 2, + 0, 0, 724, 726, 1, 0, 0, 0, 725, 722, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, + 726, 727, 1, 0, 0, 0, 727, 739, 3, 200, 100, 0, 728, 729, 5, 3, 0, 0, 729, + 734, 3, 190, 95, 0, 730, 731, 5, 5, 0, 0, 731, 733, 3, 190, 95, 0, 732, + 730, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, + 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 737, 738, 5, 4, + 0, 0, 738, 740, 1, 0, 0, 0, 739, 728, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, + 740, 741, 1, 0, 0, 0, 741, 742, 5, 35, 0, 0, 742, 743, 3, 84, 42, 0, 743, + 47, 1, 0, 0, 0, 744, 745, 5, 52, 0, 0, 745, 746, 5, 149, 0, 0, 746, 750, + 5, 135, 0, 0, 747, 748, 5, 82, 0, 0, 748, 749, 5, 104, 0, 0, 749, 751, + 5, 72, 0, 0, 750, 747, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 755, 1, 0, + 0, 0, 752, 753, 3, 182, 91, 0, 753, 754, 5, 2, 0, 0, 754, 756, 1, 0, 0, + 0, 755, 752, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, + 758, 3, 184, 92, 0, 758, 759, 5, 145, 0, 0, 759, 771, 3, 202, 101, 0, 760, + 761, 5, 3, 0, 0, 761, 766, 3, 170, 85, 0, 762, 763, 5, 5, 0, 0, 763, 765, + 3, 170, 85, 0, 764, 762, 1, 0, 0, 0, 765, 768, 1, 0, 0, 0, 766, 764, 1, + 0, 0, 0, 766, 767, 1, 0, 0, 0, 767, 769, 1, 0, 0, 0, 768, 766, 1, 0, 0, + 0, 769, 770, 5, 4, 0, 0, 770, 772, 1, 0, 0, 0, 771, 760, 1, 0, 0, 0, 771, + 772, 1, 0, 0, 0, 772, 49, 1, 0, 0, 0, 773, 775, 5, 152, 0, 0, 774, 776, + 5, 118, 0, 0, 775, 774, 1, 0, 0, 0, 775, 776, 1, 0, 0, 0, 776, 777, 1, + 0, 0, 0, 777, 778, 3, 52, 26, 0, 778, 779, 5, 35, 0, 0, 779, 780, 5, 3, + 0, 0, 780, 781, 3, 84, 42, 0, 781, 791, 5, 4, 0, 0, 782, 783, 5, 5, 0, + 0, 783, 784, 3, 52, 26, 0, 784, 785, 5, 35, 0, 0, 785, 786, 5, 3, 0, 0, + 786, 787, 3, 84, 42, 0, 787, 788, 5, 4, 0, 0, 788, 790, 1, 0, 0, 0, 789, + 782, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, + 1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 806, 3, 184, + 92, 0, 795, 796, 5, 3, 0, 0, 796, 801, 3, 190, 95, 0, 797, 798, 5, 5, 0, + 0, 798, 800, 3, 190, 95, 0, 799, 797, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, + 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 804, 1, 0, 0, 0, 803, + 801, 1, 0, 0, 0, 804, 805, 5, 4, 0, 0, 805, 807, 1, 0, 0, 0, 806, 795, + 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 53, 1, 0, 0, 0, 808, 809, 3, 52, + 26, 0, 809, 810, 5, 35, 0, 0, 810, 811, 5, 3, 0, 0, 811, 812, 3, 162, 81, + 0, 812, 814, 5, 142, 0, 0, 813, 815, 5, 31, 0, 0, 814, 813, 1, 0, 0, 0, + 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 3, 164, 82, 0, 817, + 818, 5, 4, 0, 0, 818, 55, 1, 0, 0, 0, 819, 831, 3, 184, 92, 0, 820, 821, + 5, 3, 0, 0, 821, 826, 3, 190, 95, 0, 822, 823, 5, 5, 0, 0, 823, 825, 3, + 190, 95, 0, 824, 822, 1, 0, 0, 0, 825, 828, 1, 0, 0, 0, 826, 824, 1, 0, + 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 1, 0, 0, 0, 828, 826, 1, 0, 0, 0, + 829, 830, 5, 4, 0, 0, 830, 832, 1, 0, 0, 0, 831, 820, 1, 0, 0, 0, 831, + 832, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 834, 5, 35, 0, 0, 834, 835, + 5, 3, 0, 0, 835, 836, 3, 84, 42, 0, 836, 837, 5, 4, 0, 0, 837, 57, 1, 0, + 0, 0, 838, 847, 5, 126, 0, 0, 839, 848, 5, 7, 0, 0, 840, 845, 3, 68, 34, + 0, 841, 843, 5, 35, 0, 0, 842, 841, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, + 844, 1, 0, 0, 0, 844, 846, 3, 172, 86, 0, 845, 842, 1, 0, 0, 0, 845, 846, + 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 839, 1, 0, 0, 0, 847, 840, 1, 0, + 0, 0, 848, 862, 1, 0, 0, 0, 849, 858, 5, 5, 0, 0, 850, 859, 5, 7, 0, 0, + 851, 856, 3, 68, 34, 0, 852, 854, 5, 35, 0, 0, 853, 852, 1, 0, 0, 0, 853, + 854, 1, 0, 0, 0, 854, 855, 1, 0, 0, 0, 855, 857, 3, 172, 86, 0, 856, 853, + 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 850, 1, 0, + 0, 0, 858, 851, 1, 0, 0, 0, 859, 861, 1, 0, 0, 0, 860, 849, 1, 0, 0, 0, + 861, 864, 1, 0, 0, 0, 862, 860, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, + 59, 1, 0, 0, 0, 864, 862, 1, 0, 0, 0, 865, 867, 3, 50, 25, 0, 866, 865, + 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 869, 5, 61, + 0, 0, 869, 870, 5, 77, 0, 0, 870, 873, 3, 112, 56, 0, 871, 872, 5, 151, + 0, 0, 872, 874, 3, 68, 34, 0, 873, 871, 1, 0, 0, 0, 873, 874, 1, 0, 0, + 0, 874, 876, 1, 0, 0, 0, 875, 877, 3, 58, 29, 0, 876, 875, 1, 0, 0, 0, + 876, 877, 1, 0, 0, 0, 877, 61, 1, 0, 0, 0, 878, 880, 3, 50, 25, 0, 879, + 878, 1, 0, 0, 0, 879, 880, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, + 5, 61, 0, 0, 882, 883, 5, 77, 0, 0, 883, 886, 3, 112, 56, 0, 884, 885, + 5, 151, 0, 0, 885, 887, 3, 68, 34, 0, 886, 884, 1, 0, 0, 0, 886, 887, 1, + 0, 0, 0, 887, 892, 1, 0, 0, 0, 888, 890, 3, 134, 67, 0, 889, 888, 1, 0, + 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 893, 3, 136, 68, + 0, 892, 889, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, + 896, 3, 58, 29, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 63, + 1, 0, 0, 0, 897, 899, 5, 63, 0, 0, 898, 900, 5, 57, 0, 0, 899, 898, 1, + 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, 901, 902, 3, 182, + 91, 0, 902, 65, 1, 0, 0, 0, 903, 904, 5, 65, 0, 0, 904, 907, 7, 9, 0, 0, + 905, 906, 5, 82, 0, 0, 906, 908, 5, 72, 0, 0, 907, 905, 1, 0, 0, 0, 907, + 908, 1, 0, 0, 0, 908, 912, 1, 0, 0, 0, 909, 910, 3, 182, 91, 0, 910, 911, + 5, 2, 0, 0, 911, 913, 1, 0, 0, 0, 912, 909, 1, 0, 0, 0, 912, 913, 1, 0, + 0, 0, 913, 914, 1, 0, 0, 0, 914, 915, 3, 228, 114, 0, 915, 67, 1, 0, 0, + 0, 916, 917, 6, 34, -1, 0, 917, 1006, 3, 72, 36, 0, 918, 1006, 5, 190, + 0, 0, 919, 1006, 5, 191, 0, 0, 920, 921, 3, 182, 91, 0, 921, 922, 5, 2, + 0, 0, 922, 924, 1, 0, 0, 0, 923, 920, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, + 924, 925, 1, 0, 0, 0, 925, 926, 3, 184, 92, 0, 926, 927, 5, 2, 0, 0, 927, + 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 930, + 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931, 932, 3, 166, 83, 0, 932, 933, + 3, 68, 34, 21, 933, 1006, 1, 0, 0, 0, 934, 935, 3, 180, 90, 0, 935, 948, + 5, 3, 0, 0, 936, 938, 5, 64, 0, 0, 937, 936, 1, 0, 0, 0, 937, 938, 1, 0, + 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68, 34, 0, 940, 941, 5, 5, 0, + 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0, 0, 943, 946, 1, 0, 0, 0, + 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 949, 1, 0, 0, 0, 946, + 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937, 1, 0, 0, 0, 948, 947, + 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, 5, 4, + 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, 0, 0, + 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0, 955, 954, 1, 0, 0, 0, + 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957, 958, 5, 3, 0, 0, 958, + 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962, 3, 68, 34, 0, 961, 959, + 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, 1, 0, + 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 5, 4, 0, 0, + 967, 1006, 1, 0, 0, 0, 968, 969, 5, 45, 0, 0, 969, 970, 5, 3, 0, 0, 970, + 971, 3, 68, 34, 0, 971, 972, 5, 35, 0, 0, 972, 973, 3, 32, 16, 0, 973, + 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977, 5, 104, 0, 0, 976, 975, + 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 980, 5, 72, + 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, + 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0, 983, 984, 5, 4, 0, 0, 984, + 1006, 1, 0, 0, 0, 985, 987, 5, 44, 0, 0, 986, 988, 3, 68, 34, 0, 987, 986, + 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994, 1, 0, 0, 0, 989, 990, 5, 150, + 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5, 138, 0, 0, 992, 993, 3, 68, + 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, + 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 1000, 1, 0, 0, 0, 998, + 999, 5, 67, 0, 0, 999, 1001, 3, 68, 34, 0, 1000, 998, 1, 0, 0, 0, 1000, + 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 1003, 5, 68, 0, 0, 1003, + 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35, 0, 1005, 916, 1, 0, 0, 0, 1005, + 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0, 1005, 928, 1, 0, 0, 0, 1005, 931, + 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005, 957, 1, 0, 0, 0, 1005, 968, 1, + 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985, 1, 0, 0, 0, 1005, 1004, 1, 0, + 0, 0, 1006, 1126, 1, 0, 0, 0, 1007, 1008, 10, 20, 0, 0, 1008, 1009, 5, + 13, 0, 0, 1009, 1125, 3, 68, 34, 21, 1010, 1011, 10, 19, 0, 0, 1011, 1012, + 7, 10, 0, 0, 1012, 1125, 3, 68, 34, 20, 1013, 1014, 10, 18, 0, 0, 1014, + 1015, 7, 11, 0, 0, 1015, 1125, 3, 68, 34, 19, 1016, 1017, 10, 17, 0, 0, + 1017, 1018, 7, 4, 0, 0, 1018, 1125, 3, 68, 34, 18, 1019, 1020, 10, 16, + 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1125, 3, 68, 34, 17, 1022, 1023, 10, + 15, 0, 0, 1023, 1024, 7, 13, 0, 0, 1024, 1125, 3, 68, 34, 16, 1025, 1041, + 10, 14, 0, 0, 1026, 1042, 5, 6, 0, 0, 1027, 1042, 5, 24, 0, 0, 1028, 1042, + 5, 25, 0, 0, 1029, 1042, 5, 26, 0, 0, 1030, 1042, 5, 94, 0, 0, 1031, 1032, + 5, 94, 0, 0, 1032, 1042, 5, 104, 0, 0, 1033, 1035, 5, 104, 0, 0, 1034, + 1033, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, + 1042, 5, 85, 0, 0, 1037, 1042, 5, 99, 0, 0, 1038, 1042, 5, 79, 0, 0, 1039, + 1042, 5, 101, 0, 0, 1040, 1042, 5, 120, 0, 0, 1041, 1026, 1, 0, 0, 0, 1041, + 1027, 1, 0, 0, 0, 1041, 1028, 1, 0, 0, 0, 1041, 1029, 1, 0, 0, 0, 1041, + 1030, 1, 0, 0, 0, 1041, 1031, 1, 0, 0, 0, 1041, 1034, 1, 0, 0, 0, 1041, + 1037, 1, 0, 0, 0, 1041, 1038, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, + 1040, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1125, 3, 68, 34, 15, 1044, + 1045, 10, 12, 0, 0, 1045, 1046, 5, 34, 0, 0, 1046, 1125, 3, 68, 34, 13, + 1047, 1048, 10, 11, 0, 0, 1048, 1049, 5, 110, 0, 0, 1049, 1125, 3, 68, + 34, 12, 1050, 1052, 10, 4, 0, 0, 1051, 1053, 5, 104, 0, 0, 1052, 1051, + 1, 0, 0, 0, 1052, 1053, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, + 5, 41, 0, 0, 1055, 1056, 3, 68, 34, 0, 1056, 1057, 5, 34, 0, 0, 1057, 1058, + 3, 68, 34, 5, 1058, 1125, 1, 0, 0, 0, 1059, 1061, 10, 13, 0, 0, 1060, 1062, + 5, 104, 0, 0, 1061, 1060, 1, 0, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, + 1, 0, 0, 0, 1063, 1102, 5, 85, 0, 0, 1064, 1074, 5, 3, 0, 0, 1065, 1075, + 3, 84, 42, 0, 1066, 1071, 3, 68, 34, 0, 1067, 1068, 5, 5, 0, 0, 1068, 1070, + 3, 68, 34, 0, 1069, 1067, 1, 0, 0, 0, 1070, 1073, 1, 0, 0, 0, 1071, 1069, + 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1071, + 1, 0, 0, 0, 1074, 1065, 1, 0, 0, 0, 1074, 1066, 1, 0, 0, 0, 1074, 1075, + 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1103, 5, 4, 0, 0, 1077, 1078, + 3, 182, 91, 0, 1078, 1079, 5, 2, 0, 0, 1079, 1081, 1, 0, 0, 0, 1080, 1077, + 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1082, 1, 0, 0, 0, 1082, 1103, + 3, 184, 92, 0, 1083, 1084, 3, 182, 91, 0, 1084, 1085, 5, 2, 0, 0, 1085, + 1087, 1, 0, 0, 0, 1086, 1083, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, + 1088, 1, 0, 0, 0, 1088, 1089, 3, 226, 113, 0, 1089, 1098, 5, 3, 0, 0, 1090, + 1095, 3, 68, 34, 0, 1091, 1092, 5, 5, 0, 0, 1092, 1094, 3, 68, 34, 0, 1093, + 1091, 1, 0, 0, 0, 1094, 1097, 1, 0, 0, 0, 1095, 1093, 1, 0, 0, 0, 1095, + 1096, 1, 0, 0, 0, 1096, 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1098, + 1090, 1, 0, 0, 0, 1098, 1099, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, + 1101, 5, 4, 0, 0, 1101, 1103, 1, 0, 0, 0, 1102, 1064, 1, 0, 0, 0, 1102, + 1080, 1, 0, 0, 0, 1102, 1086, 1, 0, 0, 0, 1103, 1125, 1, 0, 0, 0, 1104, + 1105, 10, 7, 0, 0, 1105, 1106, 5, 47, 0, 0, 1106, 1125, 3, 192, 96, 0, + 1107, 1109, 10, 6, 0, 0, 1108, 1110, 5, 104, 0, 0, 1109, 1108, 1, 0, 0, + 0, 1109, 1110, 1, 0, 0, 0, 1110, 1111, 1, 0, 0, 0, 1111, 1112, 7, 14, 0, + 0, 1112, 1115, 3, 68, 34, 0, 1113, 1114, 5, 69, 0, 0, 1114, 1116, 3, 68, + 34, 0, 1115, 1113, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1125, 1, 0, + 0, 0, 1117, 1122, 10, 5, 0, 0, 1118, 1123, 5, 95, 0, 0, 1119, 1123, 5, + 105, 0, 0, 1120, 1121, 5, 104, 0, 0, 1121, 1123, 5, 106, 0, 0, 1122, 1118, + 1, 0, 0, 0, 1122, 1119, 1, 0, 0, 0, 1122, 1120, 1, 0, 0, 0, 1123, 1125, + 1, 0, 0, 0, 1124, 1007, 1, 0, 0, 0, 1124, 1010, 1, 0, 0, 0, 1124, 1013, + 1, 0, 0, 0, 1124, 1016, 1, 0, 0, 0, 1124, 1019, 1, 0, 0, 0, 1124, 1022, + 1, 0, 0, 0, 1124, 1025, 1, 0, 0, 0, 1124, 1044, 1, 0, 0, 0, 1124, 1047, + 1, 0, 0, 0, 1124, 1050, 1, 0, 0, 0, 1124, 1059, 1, 0, 0, 0, 1124, 1104, + 1, 0, 0, 0, 1124, 1107, 1, 0, 0, 0, 1124, 1117, 1, 0, 0, 0, 1125, 1128, + 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 69, 1, + 0, 0, 0, 1128, 1126, 1, 0, 0, 0, 1129, 1130, 5, 117, 0, 0, 1130, 1135, + 5, 3, 0, 0, 1131, 1136, 5, 83, 0, 0, 1132, 1133, 7, 15, 0, 0, 1133, 1134, + 5, 5, 0, 0, 1134, 1136, 3, 168, 84, 0, 1135, 1131, 1, 0, 0, 0, 1135, 1132, + 1, 0, 0, 0, 1136, 1137, 1, 0, 0, 0, 1137, 1138, 5, 4, 0, 0, 1138, 71, 1, + 0, 0, 0, 1139, 1140, 7, 16, 0, 0, 1140, 73, 1, 0, 0, 0, 1141, 1143, 3, + 50, 25, 0, 1142, 1141, 1, 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1149, + 1, 0, 0, 0, 1144, 1150, 5, 90, 0, 0, 1145, 1150, 5, 124, 0, 0, 1146, 1147, + 5, 90, 0, 0, 1147, 1148, 5, 110, 0, 0, 1148, 1150, 7, 8, 0, 0, 1149, 1144, + 1, 0, 0, 0, 1149, 1145, 1, 0, 0, 0, 1149, 1146, 1, 0, 0, 0, 1150, 1151, + 1, 0, 0, 0, 1151, 1155, 5, 93, 0, 0, 1152, 1153, 3, 182, 91, 0, 1153, 1154, + 5, 2, 0, 0, 1154, 1156, 1, 0, 0, 0, 1155, 1152, 1, 0, 0, 0, 1155, 1156, + 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1160, 3, 184, 92, 0, 1158, 1159, + 5, 35, 0, 0, 1159, 1161, 3, 208, 104, 0, 1160, 1158, 1, 0, 0, 0, 1160, + 1161, 1, 0, 0, 0, 1161, 1173, 1, 0, 0, 0, 1162, 1163, 5, 3, 0, 0, 1163, + 1168, 3, 190, 95, 0, 1164, 1165, 5, 5, 0, 0, 1165, 1167, 3, 190, 95, 0, + 1166, 1164, 1, 0, 0, 0, 1167, 1170, 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, + 1168, 1169, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, + 1171, 1172, 5, 4, 0, 0, 1172, 1174, 1, 0, 0, 0, 1173, 1162, 1, 0, 0, 0, + 1173, 1174, 1, 0, 0, 0, 1174, 1206, 1, 0, 0, 0, 1175, 1176, 5, 147, 0, + 0, 1176, 1177, 5, 3, 0, 0, 1177, 1182, 3, 68, 34, 0, 1178, 1179, 5, 5, + 0, 0, 1179, 1181, 3, 68, 34, 0, 1180, 1178, 1, 0, 0, 0, 1181, 1184, 1, + 0, 0, 0, 1182, 1180, 1, 0, 0, 0, 1182, 1183, 1, 0, 0, 0, 1183, 1185, 1, + 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1185, 1200, 5, 4, 0, 0, 1186, 1187, 5, + 5, 0, 0, 1187, 1188, 5, 3, 0, 0, 1188, 1193, 3, 68, 34, 0, 1189, 1190, + 5, 5, 0, 0, 1190, 1192, 3, 68, 34, 0, 1191, 1189, 1, 0, 0, 0, 1192, 1195, + 1, 0, 0, 0, 1193, 1191, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1196, + 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1196, 1197, 5, 4, 0, 0, 1197, 1199, + 1, 0, 0, 0, 1198, 1186, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, + 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1207, 1, 0, 0, 0, 1202, 1200, + 1, 0, 0, 0, 1203, 1207, 3, 84, 42, 0, 1204, 1205, 5, 58, 0, 0, 1205, 1207, + 5, 147, 0, 0, 1206, 1175, 1, 0, 0, 0, 1206, 1203, 1, 0, 0, 0, 1206, 1204, + 1, 0, 0, 0, 1207, 1209, 1, 0, 0, 0, 1208, 1210, 3, 76, 38, 0, 1209, 1208, + 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, 1212, 1, 0, 0, 0, 1211, 1213, + 3, 58, 29, 0, 1212, 1211, 1, 0, 0, 0, 1212, 1213, 1, 0, 0, 0, 1213, 75, + 1, 0, 0, 0, 1214, 1215, 5, 109, 0, 0, 1215, 1230, 5, 50, 0, 0, 1216, 1217, + 5, 3, 0, 0, 1217, 1222, 3, 24, 12, 0, 1218, 1219, 5, 5, 0, 0, 1219, 1221, + 3, 24, 12, 0, 1220, 1218, 1, 0, 0, 0, 1221, 1224, 1, 0, 0, 0, 1222, 1220, + 1, 0, 0, 0, 1222, 1223, 1, 0, 0, 0, 1223, 1225, 1, 0, 0, 0, 1224, 1222, + 1, 0, 0, 0, 1225, 1228, 5, 4, 0, 0, 1226, 1227, 5, 151, 0, 0, 1227, 1229, + 3, 68, 34, 0, 1228, 1226, 1, 0, 0, 0, 1228, 1229, 1, 0, 0, 0, 1229, 1231, + 1, 0, 0, 0, 1230, 1216, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1232, + 1, 0, 0, 0, 1232, 1259, 5, 186, 0, 0, 1233, 1260, 5, 187, 0, 0, 1234, 1235, + 5, 144, 0, 0, 1235, 1238, 5, 133, 0, 0, 1236, 1239, 3, 190, 95, 0, 1237, + 1239, 3, 108, 54, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1237, 1, 0, 0, 0, 1239, + 1240, 1, 0, 0, 0, 1240, 1241, 5, 6, 0, 0, 1241, 1252, 3, 68, 34, 0, 1242, + 1245, 5, 5, 0, 0, 1243, 1246, 3, 190, 95, 0, 1244, 1246, 3, 108, 54, 0, + 1245, 1243, 1, 0, 0, 0, 1245, 1244, 1, 0, 0, 0, 1246, 1247, 1, 0, 0, 0, + 1247, 1248, 5, 6, 0, 0, 1248, 1249, 3, 68, 34, 0, 1249, 1251, 1, 0, 0, + 0, 1250, 1242, 1, 0, 0, 0, 1251, 1254, 1, 0, 0, 0, 1252, 1250, 1, 0, 0, + 0, 1252, 1253, 1, 0, 0, 0, 1253, 1257, 1, 0, 0, 0, 1254, 1252, 1, 0, 0, + 0, 1255, 1256, 5, 151, 0, 0, 1256, 1258, 3, 68, 34, 0, 1257, 1255, 1, 0, + 0, 0, 1257, 1258, 1, 0, 0, 0, 1258, 1260, 1, 0, 0, 0, 1259, 1233, 1, 0, + 0, 0, 1259, 1234, 1, 0, 0, 0, 1260, 77, 1, 0, 0, 0, 1261, 1265, 5, 114, + 0, 0, 1262, 1263, 3, 182, 91, 0, 1263, 1264, 5, 2, 0, 0, 1264, 1266, 1, + 0, 0, 0, 1265, 1262, 1, 0, 0, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1267, 1, + 0, 0, 0, 1267, 1274, 3, 204, 102, 0, 1268, 1269, 5, 6, 0, 0, 1269, 1275, + 3, 80, 40, 0, 1270, 1271, 5, 3, 0, 0, 1271, 1272, 3, 80, 40, 0, 1272, 1273, + 5, 4, 0, 0, 1273, 1275, 1, 0, 0, 0, 1274, 1268, 1, 0, 0, 0, 1274, 1270, + 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, 79, 1, 0, 0, 0, 1276, 1280, 3, + 36, 18, 0, 1277, 1280, 3, 176, 88, 0, 1278, 1280, 5, 192, 0, 0, 1279, 1276, + 1, 0, 0, 0, 1279, 1277, 1, 0, 0, 0, 1279, 1278, 1, 0, 0, 0, 1280, 81, 1, + 0, 0, 0, 1281, 1292, 5, 121, 0, 0, 1282, 1293, 3, 192, 96, 0, 1283, 1284, + 3, 182, 91, 0, 1284, 1285, 5, 2, 0, 0, 1285, 1287, 1, 0, 0, 0, 1286, 1283, + 1, 0, 0, 0, 1286, 1287, 1, 0, 0, 0, 1287, 1290, 1, 0, 0, 0, 1288, 1291, + 3, 184, 92, 0, 1289, 1291, 3, 196, 98, 0, 1290, 1288, 1, 0, 0, 0, 1290, + 1289, 1, 0, 0, 0, 1291, 1293, 1, 0, 0, 0, 1292, 1282, 1, 0, 0, 0, 1292, + 1286, 1, 0, 0, 0, 1292, 1293, 1, 0, 0, 0, 1293, 83, 1, 0, 0, 0, 1294, 1296, + 3, 132, 66, 0, 1295, 1294, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 1297, + 1, 0, 0, 0, 1297, 1303, 3, 88, 44, 0, 1298, 1299, 3, 104, 52, 0, 1299, + 1300, 3, 88, 44, 0, 1300, 1302, 1, 0, 0, 0, 1301, 1298, 1, 0, 0, 0, 1302, + 1305, 1, 0, 0, 0, 1303, 1301, 1, 0, 0, 0, 1303, 1304, 1, 0, 0, 0, 1304, + 1307, 1, 0, 0, 0, 1305, 1303, 1, 0, 0, 0, 1306, 1308, 3, 134, 67, 0, 1307, + 1306, 1, 0, 0, 0, 1307, 1308, 1, 0, 0, 0, 1308, 1310, 1, 0, 0, 0, 1309, + 1311, 3, 136, 68, 0, 1310, 1309, 1, 0, 0, 0, 1310, 1311, 1, 0, 0, 0, 1311, + 85, 1, 0, 0, 0, 1312, 1319, 3, 96, 48, 0, 1313, 1314, 3, 100, 50, 0, 1314, + 1315, 3, 96, 48, 0, 1315, 1316, 3, 102, 51, 0, 1316, 1318, 1, 0, 0, 0, + 1317, 1313, 1, 0, 0, 0, 1318, 1321, 1, 0, 0, 0, 1319, 1317, 1, 0, 0, 0, + 1319, 1320, 1, 0, 0, 0, 1320, 87, 1, 0, 0, 0, 1321, 1319, 1, 0, 0, 0, 1322, + 1324, 5, 132, 0, 0, 1323, 1325, 7, 17, 0, 0, 1324, 1323, 1, 0, 0, 0, 1324, + 1325, 1, 0, 0, 0, 1325, 1326, 1, 0, 0, 0, 1326, 1331, 3, 98, 49, 0, 1327, + 1328, 5, 5, 0, 0, 1328, 1330, 3, 98, 49, 0, 1329, 1327, 1, 0, 0, 0, 1330, + 1333, 1, 0, 0, 0, 1331, 1329, 1, 0, 0, 0, 1331, 1332, 1, 0, 0, 0, 1332, + 1346, 1, 0, 0, 0, 1333, 1331, 1, 0, 0, 0, 1334, 1344, 5, 77, 0, 0, 1335, + 1340, 3, 96, 48, 0, 1336, 1337, 5, 5, 0, 0, 1337, 1339, 3, 96, 48, 0, 1338, + 1336, 1, 0, 0, 0, 1339, 1342, 1, 0, 0, 0, 1340, 1338, 1, 0, 0, 0, 1340, + 1341, 1, 0, 0, 0, 1341, 1345, 1, 0, 0, 0, 1342, 1340, 1, 0, 0, 0, 1343, + 1345, 3, 86, 43, 0, 1344, 1335, 1, 0, 0, 0, 1344, 1343, 1, 0, 0, 0, 1345, + 1347, 1, 0, 0, 0, 1346, 1334, 1, 0, 0, 0, 1346, 1347, 1, 0, 0, 0, 1347, + 1350, 1, 0, 0, 0, 1348, 1349, 5, 151, 0, 0, 1349, 1351, 3, 68, 34, 0, 1350, + 1348, 1, 0, 0, 0, 1350, 1351, 1, 0, 0, 0, 1351, 1366, 1, 0, 0, 0, 1352, + 1353, 5, 80, 0, 0, 1353, 1354, 5, 42, 0, 0, 1354, 1359, 3, 68, 34, 0, 1355, + 1356, 5, 5, 0, 0, 1356, 1358, 3, 68, 34, 0, 1357, 1355, 1, 0, 0, 0, 1358, + 1361, 1, 0, 0, 0, 1359, 1357, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, + 1364, 1, 0, 0, 0, 1361, 1359, 1, 0, 0, 0, 1362, 1363, 5, 81, 0, 0, 1363, + 1365, 3, 68, 34, 0, 1364, 1362, 1, 0, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, + 1367, 1, 0, 0, 0, 1366, 1352, 1, 0, 0, 0, 1366, 1367, 1, 0, 0, 0, 1367, + 1382, 1, 0, 0, 0, 1368, 1369, 5, 177, 0, 0, 1369, 1370, 3, 214, 107, 0, + 1370, 1371, 5, 35, 0, 0, 1371, 1379, 3, 118, 59, 0, 1372, 1373, 5, 5, 0, + 0, 1373, 1374, 3, 214, 107, 0, 1374, 1375, 5, 35, 0, 0, 1375, 1376, 3, + 118, 59, 0, 1376, 1378, 1, 0, 0, 0, 1377, 1372, 1, 0, 0, 0, 1378, 1381, + 1, 0, 0, 0, 1379, 1377, 1, 0, 0, 0, 1379, 1380, 1, 0, 0, 0, 1380, 1383, + 1, 0, 0, 0, 1381, 1379, 1, 0, 0, 0, 1382, 1368, 1, 0, 0, 0, 1382, 1383, + 1, 0, 0, 0, 1383, 1413, 1, 0, 0, 0, 1384, 1385, 5, 147, 0, 0, 1385, 1386, + 5, 3, 0, 0, 1386, 1391, 3, 68, 34, 0, 1387, 1388, 5, 5, 0, 0, 1388, 1390, + 3, 68, 34, 0, 1389, 1387, 1, 0, 0, 0, 1390, 1393, 1, 0, 0, 0, 1391, 1389, + 1, 0, 0, 0, 1391, 1392, 1, 0, 0, 0, 1392, 1394, 1, 0, 0, 0, 1393, 1391, + 1, 0, 0, 0, 1394, 1409, 5, 4, 0, 0, 1395, 1396, 5, 5, 0, 0, 1396, 1397, + 5, 3, 0, 0, 1397, 1402, 3, 68, 34, 0, 1398, 1399, 5, 5, 0, 0, 1399, 1401, + 3, 68, 34, 0, 1400, 1398, 1, 0, 0, 0, 1401, 1404, 1, 0, 0, 0, 1402, 1400, + 1, 0, 0, 0, 1402, 1403, 1, 0, 0, 0, 1403, 1405, 1, 0, 0, 0, 1404, 1402, + 1, 0, 0, 0, 1405, 1406, 5, 4, 0, 0, 1406, 1408, 1, 0, 0, 0, 1407, 1395, + 1, 0, 0, 0, 1408, 1411, 1, 0, 0, 0, 1409, 1407, 1, 0, 0, 0, 1409, 1410, + 1, 0, 0, 0, 1410, 1413, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1412, 1322, + 1, 0, 0, 0, 1412, 1384, 1, 0, 0, 0, 1413, 89, 1, 0, 0, 0, 1414, 1415, 3, + 84, 42, 0, 1415, 91, 1, 0, 0, 0, 1416, 1418, 3, 132, 66, 0, 1417, 1416, + 1, 0, 0, 0, 1417, 1418, 1, 0, 0, 0, 1418, 1419, 1, 0, 0, 0, 1419, 1421, + 3, 88, 44, 0, 1420, 1422, 3, 134, 67, 0, 1421, 1420, 1, 0, 0, 0, 1421, + 1422, 1, 0, 0, 0, 1422, 1424, 1, 0, 0, 0, 1423, 1425, 3, 136, 68, 0, 1424, + 1423, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 93, 1, 0, 0, 0, 1426, 1428, + 3, 132, 66, 0, 1427, 1426, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 1429, + 1, 0, 0, 0, 1429, 1439, 3, 88, 44, 0, 1430, 1432, 5, 142, 0, 0, 1431, 1433, + 5, 31, 0, 0, 1432, 1431, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1437, + 1, 0, 0, 0, 1434, 1437, 5, 92, 0, 0, 1435, 1437, 5, 70, 0, 0, 1436, 1430, + 1, 0, 0, 0, 1436, 1434, 1, 0, 0, 0, 1436, 1435, 1, 0, 0, 0, 1437, 1438, + 1, 0, 0, 0, 1438, 1440, 3, 88, 44, 0, 1439, 1436, 1, 0, 0, 0, 1440, 1441, + 1, 0, 0, 0, 1441, 1439, 1, 0, 0, 0, 1441, 1442, 1, 0, 0, 0, 1442, 1444, + 1, 0, 0, 0, 1443, 1445, 3, 134, 67, 0, 1444, 1443, 1, 0, 0, 0, 1444, 1445, + 1, 0, 0, 0, 1445, 1447, 1, 0, 0, 0, 1446, 1448, 3, 136, 68, 0, 1447, 1446, + 1, 0, 0, 0, 1447, 1448, 1, 0, 0, 0, 1448, 95, 1, 0, 0, 0, 1449, 1450, 3, + 182, 91, 0, 1450, 1451, 5, 2, 0, 0, 1451, 1453, 1, 0, 0, 0, 1452, 1449, + 1, 0, 0, 0, 1452, 1453, 1, 0, 0, 0, 1453, 1454, 1, 0, 0, 0, 1454, 1459, + 3, 184, 92, 0, 1455, 1457, 5, 35, 0, 0, 1456, 1455, 1, 0, 0, 0, 1456, 1457, + 1, 0, 0, 0, 1457, 1458, 1, 0, 0, 0, 1458, 1460, 3, 208, 104, 0, 1459, 1456, + 1, 0, 0, 0, 1459, 1460, 1, 0, 0, 0, 1460, 1466, 1, 0, 0, 0, 1461, 1462, + 5, 87, 0, 0, 1462, 1463, 5, 42, 0, 0, 1463, 1467, 3, 196, 98, 0, 1464, + 1465, 5, 104, 0, 0, 1465, 1467, 5, 87, 0, 0, 1466, 1461, 1, 0, 0, 0, 1466, + 1464, 1, 0, 0, 0, 1466, 1467, 1, 0, 0, 0, 1467, 1578, 1, 0, 0, 0, 1468, + 1469, 3, 182, 91, 0, 1469, 1470, 5, 2, 0, 0, 1470, 1472, 1, 0, 0, 0, 1471, + 1468, 1, 0, 0, 0, 1471, 1472, 1, 0, 0, 0, 1472, 1473, 1, 0, 0, 0, 1473, + 1474, 3, 226, 113, 0, 1474, 1475, 5, 3, 0, 0, 1475, 1480, 3, 68, 34, 0, + 1476, 1477, 5, 5, 0, 0, 1477, 1479, 3, 68, 34, 0, 1478, 1476, 1, 0, 0, + 0, 1479, 1482, 1, 0, 0, 0, 1480, 1478, 1, 0, 0, 0, 1480, 1481, 1, 0, 0, + 0, 1481, 1483, 1, 0, 0, 0, 1482, 1480, 1, 0, 0, 0, 1483, 1488, 5, 4, 0, + 0, 1484, 1486, 5, 35, 0, 0, 1485, 1484, 1, 0, 0, 0, 1485, 1486, 1, 0, 0, + 0, 1486, 1487, 1, 0, 0, 0, 1487, 1489, 3, 208, 104, 0, 1488, 1485, 1, 0, + 0, 0, 1488, 1489, 1, 0, 0, 0, 1489, 1578, 1, 0, 0, 0, 1490, 1500, 5, 3, + 0, 0, 1491, 1496, 3, 96, 48, 0, 1492, 1493, 5, 5, 0, 0, 1493, 1495, 3, + 96, 48, 0, 1494, 1492, 1, 0, 0, 0, 1495, 1498, 1, 0, 0, 0, 1496, 1494, + 1, 0, 0, 0, 1496, 1497, 1, 0, 0, 0, 1497, 1501, 1, 0, 0, 0, 1498, 1496, + 1, 0, 0, 0, 1499, 1501, 3, 86, 43, 0, 1500, 1491, 1, 0, 0, 0, 1500, 1499, + 1, 0, 0, 0, 1501, 1502, 1, 0, 0, 0, 1502, 1503, 5, 4, 0, 0, 1503, 1578, + 1, 0, 0, 0, 1504, 1505, 5, 3, 0, 0, 1505, 1506, 3, 84, 42, 0, 1506, 1511, + 5, 4, 0, 0, 1507, 1509, 5, 35, 0, 0, 1508, 1507, 1, 0, 0, 0, 1508, 1509, + 1, 0, 0, 0, 1509, 1510, 1, 0, 0, 0, 1510, 1512, 3, 208, 104, 0, 1511, 1508, + 1, 0, 0, 0, 1511, 1512, 1, 0, 0, 0, 1512, 1578, 1, 0, 0, 0, 1513, 1514, + 3, 182, 91, 0, 1514, 1515, 5, 2, 0, 0, 1515, 1517, 1, 0, 0, 0, 1516, 1513, + 1, 0, 0, 0, 1516, 1517, 1, 0, 0, 0, 1517, 1518, 1, 0, 0, 0, 1518, 1523, + 3, 184, 92, 0, 1519, 1521, 5, 35, 0, 0, 1520, 1519, 1, 0, 0, 0, 1520, 1521, + 1, 0, 0, 0, 1521, 1522, 1, 0, 0, 0, 1522, 1524, 3, 210, 105, 0, 1523, 1520, + 1, 0, 0, 0, 1523, 1524, 1, 0, 0, 0, 1524, 1530, 1, 0, 0, 0, 1525, 1526, + 5, 87, 0, 0, 1526, 1527, 5, 42, 0, 0, 1527, 1531, 3, 196, 98, 0, 1528, + 1529, 5, 104, 0, 0, 1529, 1531, 5, 87, 0, 0, 1530, 1525, 1, 0, 0, 0, 1530, + 1528, 1, 0, 0, 0, 1530, 1531, 1, 0, 0, 0, 1531, 1578, 1, 0, 0, 0, 1532, + 1533, 3, 182, 91, 0, 1533, 1534, 5, 2, 0, 0, 1534, 1536, 1, 0, 0, 0, 1535, + 1532, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, 1537, 1, 0, 0, 0, 1537, + 1538, 3, 226, 113, 0, 1538, 1539, 5, 3, 0, 0, 1539, 1544, 3, 68, 34, 0, + 1540, 1541, 5, 5, 0, 0, 1541, 1543, 3, 68, 34, 0, 1542, 1540, 1, 0, 0, + 0, 1543, 1546, 1, 0, 0, 0, 1544, 1542, 1, 0, 0, 0, 1544, 1545, 1, 0, 0, + 0, 1545, 1547, 1, 0, 0, 0, 1546, 1544, 1, 0, 0, 0, 1547, 1552, 5, 4, 0, + 0, 1548, 1550, 5, 35, 0, 0, 1549, 1548, 1, 0, 0, 0, 1549, 1550, 1, 0, 0, + 0, 1550, 1551, 1, 0, 0, 0, 1551, 1553, 3, 210, 105, 0, 1552, 1549, 1, 0, + 0, 0, 1552, 1553, 1, 0, 0, 0, 1553, 1578, 1, 0, 0, 0, 1554, 1564, 5, 3, + 0, 0, 1555, 1560, 3, 96, 48, 0, 1556, 1557, 5, 5, 0, 0, 1557, 1559, 3, + 96, 48, 0, 1558, 1556, 1, 0, 0, 0, 1559, 1562, 1, 0, 0, 0, 1560, 1558, + 1, 0, 0, 0, 1560, 1561, 1, 0, 0, 0, 1561, 1565, 1, 0, 0, 0, 1562, 1560, + 1, 0, 0, 0, 1563, 1565, 3, 86, 43, 0, 1564, 1555, 1, 0, 0, 0, 1564, 1563, + 1, 0, 0, 0, 1565, 1566, 1, 0, 0, 0, 1566, 1567, 5, 4, 0, 0, 1567, 1578, + 1, 0, 0, 0, 1568, 1569, 5, 3, 0, 0, 1569, 1570, 3, 84, 42, 0, 1570, 1575, + 5, 4, 0, 0, 1571, 1573, 5, 35, 0, 0, 1572, 1571, 1, 0, 0, 0, 1572, 1573, + 1, 0, 0, 0, 1573, 1574, 1, 0, 0, 0, 1574, 1576, 3, 210, 105, 0, 1575, 1572, + 1, 0, 0, 0, 1575, 1576, 1, 0, 0, 0, 1576, 1578, 1, 0, 0, 0, 1577, 1452, + 1, 0, 0, 0, 1577, 1471, 1, 0, 0, 0, 1577, 1490, 1, 0, 0, 0, 1577, 1504, + 1, 0, 0, 0, 1577, 1516, 1, 0, 0, 0, 1577, 1535, 1, 0, 0, 0, 1577, 1554, + 1, 0, 0, 0, 1577, 1568, 1, 0, 0, 0, 1578, 97, 1, 0, 0, 0, 1579, 1592, 5, + 7, 0, 0, 1580, 1581, 3, 184, 92, 0, 1581, 1582, 5, 2, 0, 0, 1582, 1583, + 5, 7, 0, 0, 1583, 1592, 1, 0, 0, 0, 1584, 1589, 3, 68, 34, 0, 1585, 1587, + 5, 35, 0, 0, 1586, 1585, 1, 0, 0, 0, 1586, 1587, 1, 0, 0, 0, 1587, 1588, + 1, 0, 0, 0, 1588, 1590, 3, 172, 86, 0, 1589, 1586, 1, 0, 0, 0, 1589, 1590, + 1, 0, 0, 0, 1590, 1592, 1, 0, 0, 0, 1591, 1579, 1, 0, 0, 0, 1591, 1580, + 1, 0, 0, 0, 1591, 1584, 1, 0, 0, 0, 1592, 99, 1, 0, 0, 0, 1593, 1608, 5, + 5, 0, 0, 1594, 1596, 5, 102, 0, 0, 1595, 1594, 1, 0, 0, 0, 1595, 1596, + 1, 0, 0, 0, 1596, 1602, 1, 0, 0, 0, 1597, 1599, 7, 18, 0, 0, 1598, 1600, + 5, 112, 0, 0, 1599, 1598, 1, 0, 0, 0, 1599, 1600, 1, 0, 0, 0, 1600, 1603, + 1, 0, 0, 0, 1601, 1603, 5, 89, 0, 0, 1602, 1597, 1, 0, 0, 0, 1602, 1601, + 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1604, 1, 0, 0, 0, 1604, 1608, + 5, 96, 0, 0, 1605, 1606, 5, 53, 0, 0, 1606, 1608, 5, 96, 0, 0, 1607, 1593, + 1, 0, 0, 0, 1607, 1595, 1, 0, 0, 0, 1607, 1605, 1, 0, 0, 0, 1608, 101, + 1, 0, 0, 0, 1609, 1610, 5, 109, 0, 0, 1610, 1624, 3, 68, 34, 0, 1611, 1612, + 5, 145, 0, 0, 1612, 1613, 5, 3, 0, 0, 1613, 1618, 3, 190, 95, 0, 1614, + 1615, 5, 5, 0, 0, 1615, 1617, 3, 190, 95, 0, 1616, 1614, 1, 0, 0, 0, 1617, + 1620, 1, 0, 0, 0, 1618, 1616, 1, 0, 0, 0, 1618, 1619, 1, 0, 0, 0, 1619, + 1621, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1621, 1622, 5, 4, 0, 0, 1622, + 1624, 1, 0, 0, 0, 1623, 1609, 1, 0, 0, 0, 1623, 1611, 1, 0, 0, 0, 1623, + 1624, 1, 0, 0, 0, 1624, 103, 1, 0, 0, 0, 1625, 1627, 5, 142, 0, 0, 1626, + 1628, 5, 31, 0, 0, 1627, 1626, 1, 0, 0, 0, 1627, 1628, 1, 0, 0, 0, 1628, + 1632, 1, 0, 0, 0, 1629, 1632, 5, 92, 0, 0, 1630, 1632, 5, 70, 0, 0, 1631, + 1625, 1, 0, 0, 0, 1631, 1629, 1, 0, 0, 0, 1631, 1630, 1, 0, 0, 0, 1632, + 105, 1, 0, 0, 0, 1633, 1635, 3, 50, 25, 0, 1634, 1633, 1, 0, 0, 0, 1634, + 1635, 1, 0, 0, 0, 1635, 1636, 1, 0, 0, 0, 1636, 1639, 5, 144, 0, 0, 1637, + 1638, 5, 110, 0, 0, 1638, 1640, 7, 8, 0, 0, 1639, 1637, 1, 0, 0, 0, 1639, + 1640, 1, 0, 0, 0, 1640, 1641, 1, 0, 0, 0, 1641, 1642, 3, 112, 56, 0, 1642, + 1645, 5, 133, 0, 0, 1643, 1646, 3, 190, 95, 0, 1644, 1646, 3, 108, 54, + 0, 1645, 1643, 1, 0, 0, 0, 1645, 1644, 1, 0, 0, 0, 1646, 1647, 1, 0, 0, + 0, 1647, 1648, 5, 6, 0, 0, 1648, 1659, 3, 68, 34, 0, 1649, 1652, 5, 5, + 0, 0, 1650, 1653, 3, 190, 95, 0, 1651, 1653, 3, 108, 54, 0, 1652, 1650, + 1, 0, 0, 0, 1652, 1651, 1, 0, 0, 0, 1653, 1654, 1, 0, 0, 0, 1654, 1655, + 5, 6, 0, 0, 1655, 1656, 3, 68, 34, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1649, + 1, 0, 0, 0, 1658, 1661, 1, 0, 0, 0, 1659, 1657, 1, 0, 0, 0, 1659, 1660, + 1, 0, 0, 0, 1660, 1664, 1, 0, 0, 0, 1661, 1659, 1, 0, 0, 0, 1662, 1663, + 5, 151, 0, 0, 1663, 1665, 3, 68, 34, 0, 1664, 1662, 1, 0, 0, 0, 1664, 1665, + 1, 0, 0, 0, 1665, 1667, 1, 0, 0, 0, 1666, 1668, 3, 58, 29, 0, 1667, 1666, + 1, 0, 0, 0, 1667, 1668, 1, 0, 0, 0, 1668, 107, 1, 0, 0, 0, 1669, 1670, + 5, 3, 0, 0, 1670, 1675, 3, 190, 95, 0, 1671, 1672, 5, 5, 0, 0, 1672, 1674, + 3, 190, 95, 0, 1673, 1671, 1, 0, 0, 0, 1674, 1677, 1, 0, 0, 0, 1675, 1673, + 1, 0, 0, 0, 1675, 1676, 1, 0, 0, 0, 1676, 1678, 1, 0, 0, 0, 1677, 1675, + 1, 0, 0, 0, 1678, 1679, 5, 4, 0, 0, 1679, 109, 1, 0, 0, 0, 1680, 1682, + 3, 50, 25, 0, 1681, 1680, 1, 0, 0, 0, 1681, 1682, 1, 0, 0, 0, 1682, 1683, + 1, 0, 0, 0, 1683, 1686, 5, 144, 0, 0, 1684, 1685, 5, 110, 0, 0, 1685, 1687, + 7, 8, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1688, + 1, 0, 0, 0, 1688, 1689, 3, 112, 56, 0, 1689, 1692, 5, 133, 0, 0, 1690, + 1693, 3, 190, 95, 0, 1691, 1693, 3, 108, 54, 0, 1692, 1690, 1, 0, 0, 0, + 1692, 1691, 1, 0, 0, 0, 1693, 1694, 1, 0, 0, 0, 1694, 1695, 5, 6, 0, 0, + 1695, 1706, 3, 68, 34, 0, 1696, 1699, 5, 5, 0, 0, 1697, 1700, 3, 190, 95, + 0, 1698, 1700, 3, 108, 54, 0, 1699, 1697, 1, 0, 0, 0, 1699, 1698, 1, 0, + 0, 0, 1700, 1701, 1, 0, 0, 0, 1701, 1702, 5, 6, 0, 0, 1702, 1703, 3, 68, + 34, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1696, 1, 0, 0, 0, 1705, 1708, 1, 0, + 0, 0, 1706, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1711, 1, 0, + 0, 0, 1708, 1706, 1, 0, 0, 0, 1709, 1710, 5, 151, 0, 0, 1710, 1712, 3, + 68, 34, 0, 1711, 1709, 1, 0, 0, 0, 1711, 1712, 1, 0, 0, 0, 1712, 1717, + 1, 0, 0, 0, 1713, 1715, 3, 134, 67, 0, 1714, 1713, 1, 0, 0, 0, 1714, 1715, + 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 1718, 3, 136, 68, 0, 1717, 1714, + 1, 0, 0, 0, 1717, 1718, 1, 0, 0, 0, 1718, 111, 1, 0, 0, 0, 1719, 1720, + 3, 182, 91, 0, 1720, 1721, 5, 2, 0, 0, 1721, 1723, 1, 0, 0, 0, 1722, 1719, + 1, 0, 0, 0, 1722, 1723, 1, 0, 0, 0, 1723, 1724, 1, 0, 0, 0, 1724, 1727, + 3, 184, 92, 0, 1725, 1726, 5, 35, 0, 0, 1726, 1728, 3, 216, 108, 0, 1727, + 1725, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1734, 1, 0, 0, 0, 1729, + 1730, 5, 87, 0, 0, 1730, 1731, 5, 42, 0, 0, 1731, 1735, 3, 196, 98, 0, + 1732, 1733, 5, 104, 0, 0, 1733, 1735, 5, 87, 0, 0, 1734, 1729, 1, 0, 0, + 0, 1734, 1732, 1, 0, 0, 0, 1734, 1735, 1, 0, 0, 0, 1735, 113, 1, 0, 0, + 0, 1736, 1738, 5, 146, 0, 0, 1737, 1739, 3, 182, 91, 0, 1738, 1737, 1, + 0, 0, 0, 1738, 1739, 1, 0, 0, 0, 1739, 1742, 1, 0, 0, 0, 1740, 1741, 5, + 93, 0, 0, 1741, 1743, 3, 218, 109, 0, 1742, 1740, 1, 0, 0, 0, 1742, 1743, + 1, 0, 0, 0, 1743, 115, 1, 0, 0, 0, 1744, 1745, 5, 181, 0, 0, 1745, 1746, + 5, 3, 0, 0, 1746, 1747, 5, 151, 0, 0, 1747, 1748, 3, 68, 34, 0, 1748, 1749, + 5, 4, 0, 0, 1749, 117, 1, 0, 0, 0, 1750, 1752, 5, 3, 0, 0, 1751, 1753, + 3, 220, 110, 0, 1752, 1751, 1, 0, 0, 0, 1752, 1753, 1, 0, 0, 0, 1753, 1764, + 1, 0, 0, 0, 1754, 1755, 5, 156, 0, 0, 1755, 1756, 5, 42, 0, 0, 1756, 1761, + 3, 68, 34, 0, 1757, 1758, 5, 5, 0, 0, 1758, 1760, 3, 68, 34, 0, 1759, 1757, + 1, 0, 0, 0, 1760, 1763, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1761, 1762, + 1, 0, 0, 0, 1762, 1765, 1, 0, 0, 0, 1763, 1761, 1, 0, 0, 0, 1764, 1754, + 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 1, 0, 0, 0, 1766, 1767, + 5, 111, 0, 0, 1767, 1768, 5, 42, 0, 0, 1768, 1773, 3, 138, 69, 0, 1769, + 1770, 5, 5, 0, 0, 1770, 1772, 3, 138, 69, 0, 1771, 1769, 1, 0, 0, 0, 1772, + 1775, 1, 0, 0, 0, 1773, 1771, 1, 0, 0, 0, 1773, 1774, 1, 0, 0, 0, 1774, + 1777, 1, 0, 0, 0, 1775, 1773, 1, 0, 0, 0, 1776, 1778, 3, 122, 61, 0, 1777, + 1776, 1, 0, 0, 0, 1777, 1778, 1, 0, 0, 0, 1778, 1779, 1, 0, 0, 0, 1779, + 1780, 5, 4, 0, 0, 1780, 119, 1, 0, 0, 0, 1781, 1815, 5, 155, 0, 0, 1782, + 1816, 3, 214, 107, 0, 1783, 1785, 5, 3, 0, 0, 1784, 1786, 3, 220, 110, + 0, 1785, 1784, 1, 0, 0, 0, 1785, 1786, 1, 0, 0, 0, 1786, 1797, 1, 0, 0, + 0, 1787, 1788, 5, 156, 0, 0, 1788, 1789, 5, 42, 0, 0, 1789, 1794, 3, 68, + 34, 0, 1790, 1791, 5, 5, 0, 0, 1791, 1793, 3, 68, 34, 0, 1792, 1790, 1, + 0, 0, 0, 1793, 1796, 1, 0, 0, 0, 1794, 1792, 1, 0, 0, 0, 1794, 1795, 1, + 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, 1, 0, 0, 0, 1797, 1787, 1, + 0, 0, 0, 1797, 1798, 1, 0, 0, 0, 1798, 1809, 1, 0, 0, 0, 1799, 1800, 5, + 111, 0, 0, 1800, 1801, 5, 42, 0, 0, 1801, 1806, 3, 138, 69, 0, 1802, 1803, + 5, 5, 0, 0, 1803, 1805, 3, 138, 69, 0, 1804, 1802, 1, 0, 0, 0, 1805, 1808, + 1, 0, 0, 0, 1806, 1804, 1, 0, 0, 0, 1806, 1807, 1, 0, 0, 0, 1807, 1810, + 1, 0, 0, 0, 1808, 1806, 1, 0, 0, 0, 1809, 1799, 1, 0, 0, 0, 1809, 1810, + 1, 0, 0, 0, 1810, 1812, 1, 0, 0, 0, 1811, 1813, 3, 122, 61, 0, 1812, 1811, + 1, 0, 0, 0, 1812, 1813, 1, 0, 0, 0, 1813, 1814, 1, 0, 0, 0, 1814, 1816, + 5, 4, 0, 0, 1815, 1782, 1, 0, 0, 0, 1815, 1783, 1, 0, 0, 0, 1816, 121, + 1, 0, 0, 0, 1817, 1825, 3, 124, 62, 0, 1818, 1819, 5, 183, 0, 0, 1819, + 1820, 5, 103, 0, 0, 1820, 1826, 5, 185, 0, 0, 1821, 1822, 5, 160, 0, 0, + 1822, 1826, 5, 129, 0, 0, 1823, 1826, 5, 80, 0, 0, 1824, 1826, 5, 184, + 0, 0, 1825, 1818, 1, 0, 0, 0, 1825, 1821, 1, 0, 0, 0, 1825, 1823, 1, 0, + 0, 0, 1825, 1824, 1, 0, 0, 0, 1825, 1826, 1, 0, 0, 0, 1826, 123, 1, 0, + 0, 0, 1827, 1834, 7, 19, 0, 0, 1828, 1835, 3, 146, 73, 0, 1829, 1830, 5, + 41, 0, 0, 1830, 1831, 3, 142, 71, 0, 1831, 1832, 5, 34, 0, 0, 1832, 1833, + 3, 144, 72, 0, 1833, 1835, 1, 0, 0, 0, 1834, 1828, 1, 0, 0, 0, 1834, 1829, + 1, 0, 0, 0, 1835, 125, 1, 0, 0, 0, 1836, 1837, 3, 222, 111, 0, 1837, 1847, + 5, 3, 0, 0, 1838, 1843, 3, 68, 34, 0, 1839, 1840, 5, 5, 0, 0, 1840, 1842, + 3, 68, 34, 0, 1841, 1839, 1, 0, 0, 0, 1842, 1845, 1, 0, 0, 0, 1843, 1841, + 1, 0, 0, 0, 1843, 1844, 1, 0, 0, 0, 1844, 1848, 1, 0, 0, 0, 1845, 1843, + 1, 0, 0, 0, 1846, 1848, 5, 7, 0, 0, 1847, 1838, 1, 0, 0, 0, 1847, 1846, + 1, 0, 0, 0, 1848, 1849, 1, 0, 0, 0, 1849, 1850, 5, 4, 0, 0, 1850, 127, + 1, 0, 0, 0, 1851, 1852, 3, 224, 112, 0, 1852, 1865, 5, 3, 0, 0, 1853, 1855, + 5, 64, 0, 0, 1854, 1853, 1, 0, 0, 0, 1854, 1855, 1, 0, 0, 0, 1855, 1856, + 1, 0, 0, 0, 1856, 1861, 3, 68, 34, 0, 1857, 1858, 5, 5, 0, 0, 1858, 1860, + 3, 68, 34, 0, 1859, 1857, 1, 0, 0, 0, 1860, 1863, 1, 0, 0, 0, 1861, 1859, + 1, 0, 0, 0, 1861, 1862, 1, 0, 0, 0, 1862, 1866, 1, 0, 0, 0, 1863, 1861, + 1, 0, 0, 0, 1864, 1866, 5, 7, 0, 0, 1865, 1854, 1, 0, 0, 0, 1865, 1864, + 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1867, 1, 0, 0, 0, 1867, 1869, + 5, 4, 0, 0, 1868, 1870, 3, 116, 58, 0, 1869, 1868, 1, 0, 0, 0, 1869, 1870, + 1, 0, 0, 0, 1870, 129, 1, 0, 0, 0, 1871, 1872, 3, 148, 74, 0, 1872, 1882, + 5, 3, 0, 0, 1873, 1878, 3, 68, 34, 0, 1874, 1875, 5, 5, 0, 0, 1875, 1877, + 3, 68, 34, 0, 1876, 1874, 1, 0, 0, 0, 1877, 1880, 1, 0, 0, 0, 1878, 1876, + 1, 0, 0, 0, 1878, 1879, 1, 0, 0, 0, 1879, 1883, 1, 0, 0, 0, 1880, 1878, + 1, 0, 0, 0, 1881, 1883, 5, 7, 0, 0, 1882, 1873, 1, 0, 0, 0, 1882, 1881, + 1, 0, 0, 0, 1882, 1883, 1, 0, 0, 0, 1883, 1884, 1, 0, 0, 0, 1884, 1886, + 5, 4, 0, 0, 1885, 1887, 3, 116, 58, 0, 1886, 1885, 1, 0, 0, 0, 1886, 1887, + 1, 0, 0, 0, 1887, 1888, 1, 0, 0, 0, 1888, 1891, 5, 155, 0, 0, 1889, 1892, + 3, 118, 59, 0, 1890, 1892, 3, 214, 107, 0, 1891, 1889, 1, 0, 0, 0, 1891, + 1890, 1, 0, 0, 0, 1892, 131, 1, 0, 0, 0, 1893, 1895, 5, 152, 0, 0, 1894, + 1896, 5, 118, 0, 0, 1895, 1894, 1, 0, 0, 0, 1895, 1896, 1, 0, 0, 0, 1896, + 1897, 1, 0, 0, 0, 1897, 1902, 3, 56, 28, 0, 1898, 1899, 5, 5, 0, 0, 1899, + 1901, 3, 56, 28, 0, 1900, 1898, 1, 0, 0, 0, 1901, 1904, 1, 0, 0, 0, 1902, + 1900, 1, 0, 0, 0, 1902, 1903, 1, 0, 0, 0, 1903, 133, 1, 0, 0, 0, 1904, + 1902, 1, 0, 0, 0, 1905, 1906, 5, 111, 0, 0, 1906, 1907, 5, 42, 0, 0, 1907, + 1912, 3, 138, 69, 0, 1908, 1909, 5, 5, 0, 0, 1909, 1911, 3, 138, 69, 0, + 1910, 1908, 1, 0, 0, 0, 1911, 1914, 1, 0, 0, 0, 1912, 1910, 1, 0, 0, 0, + 1912, 1913, 1, 0, 0, 0, 1913, 135, 1, 0, 0, 0, 1914, 1912, 1, 0, 0, 0, + 1915, 1916, 5, 100, 0, 0, 1916, 1919, 3, 68, 34, 0, 1917, 1918, 7, 20, + 0, 0, 1918, 1920, 3, 68, 34, 0, 1919, 1917, 1, 0, 0, 0, 1919, 1920, 1, + 0, 0, 0, 1920, 137, 1, 0, 0, 0, 1921, 1924, 3, 68, 34, 0, 1922, 1923, 5, + 47, 0, 0, 1923, 1925, 3, 192, 96, 0, 1924, 1922, 1, 0, 0, 0, 1924, 1925, + 1, 0, 0, 0, 1925, 1927, 1, 0, 0, 0, 1926, 1928, 3, 140, 70, 0, 1927, 1926, + 1, 0, 0, 0, 1927, 1928, 1, 0, 0, 0, 1928, 1931, 1, 0, 0, 0, 1929, 1930, + 5, 178, 0, 0, 1930, 1932, 7, 21, 0, 0, 1931, 1929, 1, 0, 0, 0, 1931, 1932, + 1, 0, 0, 0, 1932, 139, 1, 0, 0, 0, 1933, 1934, 7, 22, 0, 0, 1934, 141, + 1, 0, 0, 0, 1935, 1936, 3, 68, 34, 0, 1936, 1937, 5, 158, 0, 0, 1937, 1946, + 1, 0, 0, 0, 1938, 1939, 3, 68, 34, 0, 1939, 1940, 5, 161, 0, 0, 1940, 1946, + 1, 0, 0, 0, 1941, 1942, 5, 160, 0, 0, 1942, 1946, 5, 129, 0, 0, 1943, 1944, + 5, 159, 0, 0, 1944, 1946, 5, 158, 0, 0, 1945, 1935, 1, 0, 0, 0, 1945, 1938, + 1, 0, 0, 0, 1945, 1941, 1, 0, 0, 0, 1945, 1943, 1, 0, 0, 0, 1946, 143, + 1, 0, 0, 0, 1947, 1948, 3, 68, 34, 0, 1948, 1949, 5, 158, 0, 0, 1949, 1958, + 1, 0, 0, 0, 1950, 1951, 3, 68, 34, 0, 1951, 1952, 5, 161, 0, 0, 1952, 1958, + 1, 0, 0, 0, 1953, 1954, 5, 160, 0, 0, 1954, 1958, 5, 129, 0, 0, 1955, 1956, + 5, 159, 0, 0, 1956, 1958, 5, 161, 0, 0, 1957, 1947, 1, 0, 0, 0, 1957, 1950, + 1, 0, 0, 0, 1957, 1953, 1, 0, 0, 0, 1957, 1955, 1, 0, 0, 0, 1958, 145, + 1, 0, 0, 0, 1959, 1960, 3, 68, 34, 0, 1960, 1961, 5, 158, 0, 0, 1961, 1967, + 1, 0, 0, 0, 1962, 1963, 5, 159, 0, 0, 1963, 1967, 5, 158, 0, 0, 1964, 1965, + 5, 160, 0, 0, 1965, 1967, 5, 129, 0, 0, 1966, 1959, 1, 0, 0, 0, 1966, 1962, + 1, 0, 0, 0, 1966, 1964, 1, 0, 0, 0, 1967, 147, 1, 0, 0, 0, 1968, 1969, + 7, 23, 0, 0, 1969, 1970, 5, 3, 0, 0, 1970, 1971, 3, 68, 34, 0, 1971, 1972, + 5, 4, 0, 0, 1972, 1973, 5, 155, 0, 0, 1973, 1975, 5, 3, 0, 0, 1974, 1976, + 3, 154, 77, 0, 1975, 1974, 1, 0, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1977, + 1, 0, 0, 0, 1977, 1979, 3, 158, 79, 0, 1978, 1980, 3, 124, 62, 0, 1979, + 1978, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, 1981, 1, 0, 0, 0, 1981, + 1982, 5, 4, 0, 0, 1982, 2054, 1, 0, 0, 0, 1983, 1984, 7, 24, 0, 0, 1984, + 1985, 5, 3, 0, 0, 1985, 1986, 5, 4, 0, 0, 1986, 1987, 5, 155, 0, 0, 1987, + 1989, 5, 3, 0, 0, 1988, 1990, 3, 154, 77, 0, 1989, 1988, 1, 0, 0, 0, 1989, + 1990, 1, 0, 0, 0, 1990, 1992, 1, 0, 0, 0, 1991, 1993, 3, 156, 78, 0, 1992, + 1991, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, 1994, 1, 0, 0, 0, 1994, + 2054, 5, 4, 0, 0, 1995, 1996, 7, 25, 0, 0, 1996, 1997, 5, 3, 0, 0, 1997, + 1998, 5, 4, 0, 0, 1998, 1999, 5, 155, 0, 0, 1999, 2001, 5, 3, 0, 0, 2000, + 2002, 3, 154, 77, 0, 2001, 2000, 1, 0, 0, 0, 2001, 2002, 1, 0, 0, 0, 2002, + 2003, 1, 0, 0, 0, 2003, 2004, 3, 158, 79, 0, 2004, 2005, 5, 4, 0, 0, 2005, + 2054, 1, 0, 0, 0, 2006, 2007, 7, 26, 0, 0, 2007, 2008, 5, 3, 0, 0, 2008, + 2010, 3, 68, 34, 0, 2009, 2011, 3, 150, 75, 0, 2010, 2009, 1, 0, 0, 0, + 2010, 2011, 1, 0, 0, 0, 2011, 2013, 1, 0, 0, 0, 2012, 2014, 3, 152, 76, + 0, 2013, 2012, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, 0, 2014, 2015, 1, 0, 0, + 0, 2015, 2016, 5, 4, 0, 0, 2016, 2017, 5, 155, 0, 0, 2017, 2019, 5, 3, + 0, 0, 2018, 2020, 3, 154, 77, 0, 2019, 2018, 1, 0, 0, 0, 2019, 2020, 1, + 0, 0, 0, 2020, 2021, 1, 0, 0, 0, 2021, 2022, 3, 158, 79, 0, 2022, 2023, + 5, 4, 0, 0, 2023, 2054, 1, 0, 0, 0, 2024, 2025, 5, 167, 0, 0, 2025, 2026, + 5, 3, 0, 0, 2026, 2027, 3, 68, 34, 0, 2027, 2028, 5, 5, 0, 0, 2028, 2029, + 3, 36, 18, 0, 2029, 2030, 5, 4, 0, 0, 2030, 2031, 5, 155, 0, 0, 2031, 2033, + 5, 3, 0, 0, 2032, 2034, 3, 154, 77, 0, 2033, 2032, 1, 0, 0, 0, 2033, 2034, + 1, 0, 0, 0, 2034, 2035, 1, 0, 0, 0, 2035, 2037, 3, 158, 79, 0, 2036, 2038, + 3, 124, 62, 0, 2037, 2036, 1, 0, 0, 0, 2037, 2038, 1, 0, 0, 0, 2038, 2039, + 1, 0, 0, 0, 2039, 2040, 5, 4, 0, 0, 2040, 2054, 1, 0, 0, 0, 2041, 2042, + 5, 168, 0, 0, 2042, 2043, 5, 3, 0, 0, 2043, 2044, 3, 68, 34, 0, 2044, 2045, + 5, 4, 0, 0, 2045, 2046, 5, 155, 0, 0, 2046, 2048, 5, 3, 0, 0, 2047, 2049, + 3, 154, 77, 0, 2048, 2047, 1, 0, 0, 0, 2048, 2049, 1, 0, 0, 0, 2049, 2050, + 1, 0, 0, 0, 2050, 2051, 3, 158, 79, 0, 2051, 2052, 5, 4, 0, 0, 2052, 2054, + 1, 0, 0, 0, 2053, 1968, 1, 0, 0, 0, 2053, 1983, 1, 0, 0, 0, 2053, 1995, + 1, 0, 0, 0, 2053, 2006, 1, 0, 0, 0, 2053, 2024, 1, 0, 0, 0, 2053, 2041, + 1, 0, 0, 0, 2054, 149, 1, 0, 0, 0, 2055, 2056, 5, 5, 0, 0, 2056, 2057, + 3, 36, 18, 0, 2057, 151, 1, 0, 0, 0, 2058, 2059, 5, 5, 0, 0, 2059, 2060, + 3, 36, 18, 0, 2060, 153, 1, 0, 0, 0, 2061, 2062, 5, 156, 0, 0, 2062, 2064, + 5, 42, 0, 0, 2063, 2065, 3, 68, 34, 0, 2064, 2063, 1, 0, 0, 0, 2065, 2066, + 1, 0, 0, 0, 2066, 2064, 1, 0, 0, 0, 2066, 2067, 1, 0, 0, 0, 2067, 155, + 1, 0, 0, 0, 2068, 2069, 5, 111, 0, 0, 2069, 2071, 5, 42, 0, 0, 2070, 2072, + 3, 68, 34, 0, 2071, 2070, 1, 0, 0, 0, 2072, 2073, 1, 0, 0, 0, 2073, 2071, + 1, 0, 0, 0, 2073, 2074, 1, 0, 0, 0, 2074, 157, 1, 0, 0, 0, 2075, 2076, + 5, 111, 0, 0, 2076, 2077, 5, 42, 0, 0, 2077, 2078, 3, 158, 79, 0, 2078, + 159, 1, 0, 0, 0, 2079, 2081, 3, 68, 34, 0, 2080, 2082, 3, 140, 70, 0, 2081, + 2080, 1, 0, 0, 0, 2081, 2082, 1, 0, 0, 0, 2082, 2090, 1, 0, 0, 0, 2083, + 2084, 5, 5, 0, 0, 2084, 2086, 3, 68, 34, 0, 2085, 2087, 3, 140, 70, 0, + 2086, 2085, 1, 0, 0, 0, 2086, 2087, 1, 0, 0, 0, 2087, 2089, 1, 0, 0, 0, + 2088, 2083, 1, 0, 0, 0, 2089, 2092, 1, 0, 0, 0, 2090, 2088, 1, 0, 0, 0, + 2090, 2091, 1, 0, 0, 0, 2091, 161, 1, 0, 0, 0, 2092, 2090, 1, 0, 0, 0, + 2093, 2094, 3, 84, 42, 0, 2094, 163, 1, 0, 0, 0, 2095, 2096, 3, 84, 42, + 0, 2096, 165, 1, 0, 0, 0, 2097, 2098, 7, 27, 0, 0, 2098, 167, 1, 0, 0, + 0, 2099, 2100, 5, 192, 0, 0, 2100, 169, 1, 0, 0, 0, 2101, 2104, 3, 68, + 34, 0, 2102, 2104, 3, 30, 15, 0, 2103, 2101, 1, 0, 0, 0, 2103, 2102, 1, + 0, 0, 0, 2104, 171, 1, 0, 0, 0, 2105, 2106, 7, 28, 0, 0, 2106, 173, 1, + 0, 0, 0, 2107, 2108, 7, 29, 0, 0, 2108, 175, 1, 0, 0, 0, 2109, 2110, 3, + 228, 114, 0, 2110, 177, 1, 0, 0, 0, 2111, 2112, 3, 228, 114, 0, 2112, 179, + 1, 0, 0, 0, 2113, 2114, 3, 182, 91, 0, 2114, 2115, 5, 2, 0, 0, 2115, 2117, + 1, 0, 0, 0, 2116, 2113, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2118, + 1, 0, 0, 0, 2118, 2119, 3, 178, 89, 0, 2119, 181, 1, 0, 0, 0, 2120, 2121, + 3, 228, 114, 0, 2121, 183, 1, 0, 0, 0, 2122, 2123, 3, 228, 114, 0, 2123, + 185, 1, 0, 0, 0, 2124, 2125, 3, 228, 114, 0, 2125, 187, 1, 0, 0, 0, 2126, + 2127, 3, 228, 114, 0, 2127, 189, 1, 0, 0, 0, 2128, 2129, 3, 228, 114, 0, + 2129, 191, 1, 0, 0, 0, 2130, 2131, 3, 228, 114, 0, 2131, 193, 1, 0, 0, + 0, 2132, 2133, 3, 228, 114, 0, 2133, 195, 1, 0, 0, 0, 2134, 2135, 3, 228, + 114, 0, 2135, 197, 1, 0, 0, 0, 2136, 2137, 3, 228, 114, 0, 2137, 199, 1, + 0, 0, 0, 2138, 2139, 3, 228, 114, 0, 2139, 201, 1, 0, 0, 0, 2140, 2141, + 3, 228, 114, 0, 2141, 203, 1, 0, 0, 0, 2142, 2143, 3, 228, 114, 0, 2143, + 205, 1, 0, 0, 0, 2144, 2145, 3, 228, 114, 0, 2145, 207, 1, 0, 0, 0, 2146, + 2147, 7, 28, 0, 0, 2147, 209, 1, 0, 0, 0, 2148, 2149, 3, 228, 114, 0, 2149, + 211, 1, 0, 0, 0, 2150, 2151, 3, 228, 114, 0, 2151, 213, 1, 0, 0, 0, 2152, + 2153, 3, 228, 114, 0, 2153, 215, 1, 0, 0, 0, 2154, 2155, 3, 228, 114, 0, + 2155, 217, 1, 0, 0, 0, 2156, 2157, 3, 228, 114, 0, 2157, 219, 1, 0, 0, + 0, 2158, 2159, 3, 228, 114, 0, 2159, 221, 1, 0, 0, 0, 2160, 2161, 3, 228, + 114, 0, 2161, 223, 1, 0, 0, 0, 2162, 2163, 3, 228, 114, 0, 2163, 225, 1, + 0, 0, 0, 2164, 2165, 3, 228, 114, 0, 2165, 227, 1, 0, 0, 0, 2166, 2174, + 5, 188, 0, 0, 2167, 2174, 3, 174, 87, 0, 2168, 2174, 5, 192, 0, 0, 2169, + 2170, 5, 3, 0, 0, 2170, 2171, 3, 228, 114, 0, 2171, 2172, 5, 4, 0, 0, 2172, + 2174, 1, 0, 0, 0, 2173, 2166, 1, 0, 0, 0, 2173, 2167, 1, 0, 0, 0, 2173, + 2168, 1, 0, 0, 0, 2173, 2169, 1, 0, 0, 0, 2174, 229, 1, 0, 0, 0, 313, 233, 241, 248, 253, 259, 265, 267, 293, 300, 307, 313, 317, 322, 325, 332, 335, 339, 347, 351, 353, 357, 361, 365, 368, 375, 381, 387, 392, 403, 409, 413, 417, 420, 425, 429, 435, 440, 449, 456, 465, 468, 472, 476, 481, 487, 499, @@ -1176,22 +1177,22 @@ func sqliteparserParserInit() { 682, 684, 691, 695, 702, 708, 714, 720, 725, 734, 739, 750, 755, 766, 771, 775, 791, 801, 806, 814, 826, 831, 842, 845, 847, 853, 856, 858, 862, 866, 873, 876, 879, 886, 889, 892, 895, 899, 907, 912, 923, 928, 937, 944, 948, - 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1031, 1038, 1049, 1058, - 1068, 1071, 1077, 1083, 1092, 1095, 1099, 1106, 1112, 1119, 1121, 1123, - 1132, 1139, 1146, 1152, 1157, 1165, 1170, 1179, 1190, 1197, 1201, 1204, - 1207, 1211, 1221, 1227, 1229, 1237, 1244, 1251, 1256, 1258, 1264, 1273, - 1278, 1285, 1289, 1291, 1294, 1302, 1306, 1309, 1318, 1323, 1330, 1339, - 1343, 1345, 1349, 1358, 1363, 1365, 1378, 1381, 1390, 1401, 1408, 1411, - 1416, 1420, 1423, 1426, 1431, 1435, 1440, 1443, 1446, 1451, 1455, 1458, - 1465, 1470, 1479, 1484, 1487, 1495, 1499, 1507, 1510, 1515, 1519, 1522, - 1529, 1534, 1543, 1548, 1551, 1559, 1563, 1571, 1574, 1576, 1585, 1588, - 1590, 1594, 1598, 1601, 1606, 1617, 1622, 1626, 1630, 1633, 1638, 1644, - 1651, 1658, 1663, 1666, 1674, 1680, 1685, 1691, 1698, 1705, 1710, 1713, - 1716, 1721, 1726, 1733, 1737, 1741, 1751, 1760, 1763, 1772, 1776, 1784, - 1793, 1796, 1805, 1808, 1811, 1814, 1824, 1833, 1842, 1846, 1853, 1860, - 1864, 1868, 1877, 1881, 1885, 1890, 1894, 1901, 1911, 1918, 1923, 1926, - 1930, 1944, 1956, 1965, 1974, 1978, 1988, 1991, 2000, 2009, 2012, 2018, - 2032, 2036, 2047, 2052, 2065, 2072, 2080, 2085, 2089, 2102, 2115, 2172, + 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1034, 1041, 1052, 1061, + 1071, 1074, 1080, 1086, 1095, 1098, 1102, 1109, 1115, 1122, 1124, 1126, + 1135, 1142, 1149, 1155, 1160, 1168, 1173, 1182, 1193, 1200, 1206, 1209, + 1212, 1222, 1228, 1230, 1238, 1245, 1252, 1257, 1259, 1265, 1274, 1279, + 1286, 1290, 1292, 1295, 1303, 1307, 1310, 1319, 1324, 1331, 1340, 1344, + 1346, 1350, 1359, 1364, 1366, 1379, 1382, 1391, 1402, 1409, 1412, 1417, + 1421, 1424, 1427, 1432, 1436, 1441, 1444, 1447, 1452, 1456, 1459, 1466, + 1471, 1480, 1485, 1488, 1496, 1500, 1508, 1511, 1516, 1520, 1523, 1530, + 1535, 1544, 1549, 1552, 1560, 1564, 1572, 1575, 1577, 1586, 1589, 1591, + 1595, 1599, 1602, 1607, 1618, 1623, 1627, 1631, 1634, 1639, 1645, 1652, + 1659, 1664, 1667, 1675, 1681, 1686, 1692, 1699, 1706, 1711, 1714, 1717, + 1722, 1727, 1734, 1738, 1742, 1752, 1761, 1764, 1773, 1777, 1785, 1794, + 1797, 1806, 1809, 1812, 1815, 1825, 1834, 1843, 1847, 1854, 1861, 1865, + 1869, 1878, 1882, 1886, 1891, 1895, 1902, 1912, 1919, 1924, 1927, 1931, + 1945, 1957, 1966, 1975, 1979, 1989, 1992, 2001, 2010, 2013, 2019, 2033, + 2037, 2048, 2053, 2066, 2073, 2081, 2086, 2090, 2103, 2116, 2173, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -1208,7 +1209,7 @@ func sqliteparserParserInit() { // NewSQLiteParser(). You can call this function if you wish to initialize the static state ahead // of time. func SQLiteParserInit() { - staticData := &sqliteparserParserStaticData + staticData := &SQLiteParserParserStaticData staticData.once.Do(sqliteparserParserInit) } @@ -1217,11 +1218,11 @@ func NewSQLiteParser(input antlr.TokenStream) *SQLiteParser { SQLiteParserInit() this := new(SQLiteParser) this.BaseParser = antlr.NewBaseParser(input) - staticData := &sqliteparserParserStaticData - this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.predictionContextCache) - this.RuleNames = staticData.ruleNames - this.LiteralNames = staticData.literalNames - this.SymbolicNames = staticData.symbolicNames + staticData := &SQLiteParserParserStaticData + this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) + this.RuleNames = staticData.RuleNames + this.LiteralNames = staticData.LiteralNames + this.SymbolicNames = staticData.SymbolicNames this.GrammarFileName = "SQLiteParser.g4" return this @@ -1238,193 +1239,195 @@ const ( SQLiteParserASSIGN = 6 SQLiteParserSTAR = 7 SQLiteParserPLUS = 8 - SQLiteParserMINUS = 9 - SQLiteParserTILDE = 10 - SQLiteParserPIPE2 = 11 - SQLiteParserDIV = 12 - SQLiteParserMOD = 13 - SQLiteParserLT2 = 14 - SQLiteParserGT2 = 15 - SQLiteParserAMP = 16 - SQLiteParserPIPE = 17 - SQLiteParserLT = 18 - SQLiteParserLT_EQ = 19 - SQLiteParserGT = 20 - SQLiteParserGT_EQ = 21 - SQLiteParserEQ = 22 - SQLiteParserNOT_EQ1 = 23 - SQLiteParserNOT_EQ2 = 24 - SQLiteParserABORT_ = 25 - SQLiteParserACTION_ = 26 - SQLiteParserADD_ = 27 - SQLiteParserAFTER_ = 28 - SQLiteParserALL_ = 29 - SQLiteParserALTER_ = 30 - SQLiteParserANALYZE_ = 31 - SQLiteParserAND_ = 32 - SQLiteParserAS_ = 33 - SQLiteParserASC_ = 34 - SQLiteParserATTACH_ = 35 - SQLiteParserAUTOINCREMENT_ = 36 - SQLiteParserBEFORE_ = 37 - SQLiteParserBEGIN_ = 38 - SQLiteParserBETWEEN_ = 39 - SQLiteParserBY_ = 40 - SQLiteParserCASCADE_ = 41 - SQLiteParserCASE_ = 42 - SQLiteParserCAST_ = 43 - SQLiteParserCHECK_ = 44 - SQLiteParserCOLLATE_ = 45 - SQLiteParserCOLUMN_ = 46 - SQLiteParserCOMMIT_ = 47 - SQLiteParserCONFLICT_ = 48 - SQLiteParserCONSTRAINT_ = 49 - SQLiteParserCREATE_ = 50 - SQLiteParserCROSS_ = 51 - SQLiteParserCURRENT_DATE_ = 52 - SQLiteParserCURRENT_TIME_ = 53 - SQLiteParserCURRENT_TIMESTAMP_ = 54 - SQLiteParserDATABASE_ = 55 - SQLiteParserDEFAULT_ = 56 - SQLiteParserDEFERRABLE_ = 57 - SQLiteParserDEFERRED_ = 58 - SQLiteParserDELETE_ = 59 - SQLiteParserDESC_ = 60 - SQLiteParserDETACH_ = 61 - SQLiteParserDISTINCT_ = 62 - SQLiteParserDROP_ = 63 - SQLiteParserEACH_ = 64 - SQLiteParserELSE_ = 65 - SQLiteParserEND_ = 66 - SQLiteParserESCAPE_ = 67 - SQLiteParserEXCEPT_ = 68 - SQLiteParserEXCLUSIVE_ = 69 - SQLiteParserEXISTS_ = 70 - SQLiteParserEXPLAIN_ = 71 - SQLiteParserFAIL_ = 72 - SQLiteParserFOR_ = 73 - SQLiteParserFOREIGN_ = 74 - SQLiteParserFROM_ = 75 - SQLiteParserFULL_ = 76 - SQLiteParserGLOB_ = 77 - SQLiteParserGROUP_ = 78 - SQLiteParserHAVING_ = 79 - SQLiteParserIF_ = 80 - SQLiteParserIGNORE_ = 81 - SQLiteParserIMMEDIATE_ = 82 - SQLiteParserIN_ = 83 - SQLiteParserINDEX_ = 84 - SQLiteParserINDEXED_ = 85 - SQLiteParserINITIALLY_ = 86 - SQLiteParserINNER_ = 87 - SQLiteParserINSERT_ = 88 - SQLiteParserINSTEAD_ = 89 - SQLiteParserINTERSECT_ = 90 - SQLiteParserINTO_ = 91 - SQLiteParserIS_ = 92 - SQLiteParserISNULL_ = 93 - SQLiteParserJOIN_ = 94 - SQLiteParserKEY_ = 95 - SQLiteParserLEFT_ = 96 - SQLiteParserLIKE_ = 97 - SQLiteParserLIMIT_ = 98 - SQLiteParserMATCH_ = 99 - SQLiteParserNATURAL_ = 100 - SQLiteParserNO_ = 101 - SQLiteParserNOT_ = 102 - SQLiteParserNOTNULL_ = 103 - SQLiteParserNULL_ = 104 - SQLiteParserOF_ = 105 - SQLiteParserOFFSET_ = 106 - SQLiteParserON_ = 107 - SQLiteParserOR_ = 108 - SQLiteParserORDER_ = 109 - SQLiteParserOUTER_ = 110 - SQLiteParserPLAN_ = 111 - SQLiteParserPRAGMA_ = 112 - SQLiteParserPRIMARY_ = 113 - SQLiteParserQUERY_ = 114 - SQLiteParserRAISE_ = 115 - SQLiteParserRECURSIVE_ = 116 - SQLiteParserREFERENCES_ = 117 - SQLiteParserREGEXP_ = 118 - SQLiteParserREINDEX_ = 119 - SQLiteParserRELEASE_ = 120 - SQLiteParserRENAME_ = 121 - SQLiteParserREPLACE_ = 122 - SQLiteParserRESTRICT_ = 123 - SQLiteParserRETURNING_ = 124 - SQLiteParserRIGHT_ = 125 - SQLiteParserROLLBACK_ = 126 - SQLiteParserROW_ = 127 - SQLiteParserROWS_ = 128 - SQLiteParserSAVEPOINT_ = 129 - SQLiteParserSELECT_ = 130 - SQLiteParserSET_ = 131 - SQLiteParserSTRICT_ = 132 - SQLiteParserTABLE_ = 133 - SQLiteParserTEMP_ = 134 - SQLiteParserTEMPORARY_ = 135 - SQLiteParserTHEN_ = 136 - SQLiteParserTO_ = 137 - SQLiteParserTRANSACTION_ = 138 - SQLiteParserTRIGGER_ = 139 - SQLiteParserUNION_ = 140 - SQLiteParserUNIQUE_ = 141 - SQLiteParserUPDATE_ = 142 - SQLiteParserUSING_ = 143 - SQLiteParserVACUUM_ = 144 - SQLiteParserVALUES_ = 145 - SQLiteParserVIEW_ = 146 - SQLiteParserVIRTUAL_ = 147 - SQLiteParserWHEN_ = 148 - SQLiteParserWHERE_ = 149 - SQLiteParserWITH_ = 150 - SQLiteParserWITHOUT_ = 151 - SQLiteParserFIRST_VALUE_ = 152 - SQLiteParserOVER_ = 153 - SQLiteParserPARTITION_ = 154 - SQLiteParserRANGE_ = 155 - SQLiteParserPRECEDING_ = 156 - SQLiteParserUNBOUNDED_ = 157 - SQLiteParserCURRENT_ = 158 - SQLiteParserFOLLOWING_ = 159 - SQLiteParserCUME_DIST_ = 160 - SQLiteParserDENSE_RANK_ = 161 - SQLiteParserLAG_ = 162 - SQLiteParserLAST_VALUE_ = 163 - SQLiteParserLEAD_ = 164 - SQLiteParserNTH_VALUE_ = 165 - SQLiteParserNTILE_ = 166 - SQLiteParserPERCENT_RANK_ = 167 - SQLiteParserRANK_ = 168 - SQLiteParserROW_NUMBER_ = 169 - SQLiteParserGENERATED_ = 170 - SQLiteParserALWAYS_ = 171 - SQLiteParserSTORED_ = 172 - SQLiteParserTRUE_ = 173 - SQLiteParserFALSE_ = 174 - SQLiteParserWINDOW_ = 175 - SQLiteParserNULLS_ = 176 - SQLiteParserFIRST_ = 177 - SQLiteParserLAST_ = 178 - SQLiteParserFILTER_ = 179 - SQLiteParserGROUPS_ = 180 - SQLiteParserEXCLUDE_ = 181 - SQLiteParserTIES_ = 182 - SQLiteParserOTHERS_ = 183 - SQLiteParserDO_ = 184 - SQLiteParserNOTHING_ = 185 - SQLiteParserIDENTIFIER = 186 - SQLiteParserNUMERIC_LITERAL = 187 - SQLiteParserNUMBERED_BIND_PARAMETER = 188 - SQLiteParserNAMED_BIND_PARAMETER = 189 - SQLiteParserSTRING_LITERAL = 190 - SQLiteParserBLOB_LITERAL = 191 - SQLiteParserSINGLE_LINE_COMMENT = 192 - SQLiteParserMULTILINE_COMMENT = 193 - SQLiteParserSPACES = 194 - SQLiteParserUNEXPECTED_CHAR = 195 + SQLiteParserPTR2 = 9 + SQLiteParserPTR = 10 + SQLiteParserMINUS = 11 + SQLiteParserTILDE = 12 + SQLiteParserPIPE2 = 13 + SQLiteParserDIV = 14 + SQLiteParserMOD = 15 + SQLiteParserLT2 = 16 + SQLiteParserGT2 = 17 + SQLiteParserAMP = 18 + SQLiteParserPIPE = 19 + SQLiteParserLT = 20 + SQLiteParserLT_EQ = 21 + SQLiteParserGT = 22 + SQLiteParserGT_EQ = 23 + SQLiteParserEQ = 24 + SQLiteParserNOT_EQ1 = 25 + SQLiteParserNOT_EQ2 = 26 + SQLiteParserABORT_ = 27 + SQLiteParserACTION_ = 28 + SQLiteParserADD_ = 29 + SQLiteParserAFTER_ = 30 + SQLiteParserALL_ = 31 + SQLiteParserALTER_ = 32 + SQLiteParserANALYZE_ = 33 + SQLiteParserAND_ = 34 + SQLiteParserAS_ = 35 + SQLiteParserASC_ = 36 + SQLiteParserATTACH_ = 37 + SQLiteParserAUTOINCREMENT_ = 38 + SQLiteParserBEFORE_ = 39 + SQLiteParserBEGIN_ = 40 + SQLiteParserBETWEEN_ = 41 + SQLiteParserBY_ = 42 + SQLiteParserCASCADE_ = 43 + SQLiteParserCASE_ = 44 + SQLiteParserCAST_ = 45 + SQLiteParserCHECK_ = 46 + SQLiteParserCOLLATE_ = 47 + SQLiteParserCOLUMN_ = 48 + SQLiteParserCOMMIT_ = 49 + SQLiteParserCONFLICT_ = 50 + SQLiteParserCONSTRAINT_ = 51 + SQLiteParserCREATE_ = 52 + SQLiteParserCROSS_ = 53 + SQLiteParserCURRENT_DATE_ = 54 + SQLiteParserCURRENT_TIME_ = 55 + SQLiteParserCURRENT_TIMESTAMP_ = 56 + SQLiteParserDATABASE_ = 57 + SQLiteParserDEFAULT_ = 58 + SQLiteParserDEFERRABLE_ = 59 + SQLiteParserDEFERRED_ = 60 + SQLiteParserDELETE_ = 61 + SQLiteParserDESC_ = 62 + SQLiteParserDETACH_ = 63 + SQLiteParserDISTINCT_ = 64 + SQLiteParserDROP_ = 65 + SQLiteParserEACH_ = 66 + SQLiteParserELSE_ = 67 + SQLiteParserEND_ = 68 + SQLiteParserESCAPE_ = 69 + SQLiteParserEXCEPT_ = 70 + SQLiteParserEXCLUSIVE_ = 71 + SQLiteParserEXISTS_ = 72 + SQLiteParserEXPLAIN_ = 73 + SQLiteParserFAIL_ = 74 + SQLiteParserFOR_ = 75 + SQLiteParserFOREIGN_ = 76 + SQLiteParserFROM_ = 77 + SQLiteParserFULL_ = 78 + SQLiteParserGLOB_ = 79 + SQLiteParserGROUP_ = 80 + SQLiteParserHAVING_ = 81 + SQLiteParserIF_ = 82 + SQLiteParserIGNORE_ = 83 + SQLiteParserIMMEDIATE_ = 84 + SQLiteParserIN_ = 85 + SQLiteParserINDEX_ = 86 + SQLiteParserINDEXED_ = 87 + SQLiteParserINITIALLY_ = 88 + SQLiteParserINNER_ = 89 + SQLiteParserINSERT_ = 90 + SQLiteParserINSTEAD_ = 91 + SQLiteParserINTERSECT_ = 92 + SQLiteParserINTO_ = 93 + SQLiteParserIS_ = 94 + SQLiteParserISNULL_ = 95 + SQLiteParserJOIN_ = 96 + SQLiteParserKEY_ = 97 + SQLiteParserLEFT_ = 98 + SQLiteParserLIKE_ = 99 + SQLiteParserLIMIT_ = 100 + SQLiteParserMATCH_ = 101 + SQLiteParserNATURAL_ = 102 + SQLiteParserNO_ = 103 + SQLiteParserNOT_ = 104 + SQLiteParserNOTNULL_ = 105 + SQLiteParserNULL_ = 106 + SQLiteParserOF_ = 107 + SQLiteParserOFFSET_ = 108 + SQLiteParserON_ = 109 + SQLiteParserOR_ = 110 + SQLiteParserORDER_ = 111 + SQLiteParserOUTER_ = 112 + SQLiteParserPLAN_ = 113 + SQLiteParserPRAGMA_ = 114 + SQLiteParserPRIMARY_ = 115 + SQLiteParserQUERY_ = 116 + SQLiteParserRAISE_ = 117 + SQLiteParserRECURSIVE_ = 118 + SQLiteParserREFERENCES_ = 119 + SQLiteParserREGEXP_ = 120 + SQLiteParserREINDEX_ = 121 + SQLiteParserRELEASE_ = 122 + SQLiteParserRENAME_ = 123 + SQLiteParserREPLACE_ = 124 + SQLiteParserRESTRICT_ = 125 + SQLiteParserRETURNING_ = 126 + SQLiteParserRIGHT_ = 127 + SQLiteParserROLLBACK_ = 128 + SQLiteParserROW_ = 129 + SQLiteParserROWS_ = 130 + SQLiteParserSAVEPOINT_ = 131 + SQLiteParserSELECT_ = 132 + SQLiteParserSET_ = 133 + SQLiteParserSTRICT_ = 134 + SQLiteParserTABLE_ = 135 + SQLiteParserTEMP_ = 136 + SQLiteParserTEMPORARY_ = 137 + SQLiteParserTHEN_ = 138 + SQLiteParserTO_ = 139 + SQLiteParserTRANSACTION_ = 140 + SQLiteParserTRIGGER_ = 141 + SQLiteParserUNION_ = 142 + SQLiteParserUNIQUE_ = 143 + SQLiteParserUPDATE_ = 144 + SQLiteParserUSING_ = 145 + SQLiteParserVACUUM_ = 146 + SQLiteParserVALUES_ = 147 + SQLiteParserVIEW_ = 148 + SQLiteParserVIRTUAL_ = 149 + SQLiteParserWHEN_ = 150 + SQLiteParserWHERE_ = 151 + SQLiteParserWITH_ = 152 + SQLiteParserWITHOUT_ = 153 + SQLiteParserFIRST_VALUE_ = 154 + SQLiteParserOVER_ = 155 + SQLiteParserPARTITION_ = 156 + SQLiteParserRANGE_ = 157 + SQLiteParserPRECEDING_ = 158 + SQLiteParserUNBOUNDED_ = 159 + SQLiteParserCURRENT_ = 160 + SQLiteParserFOLLOWING_ = 161 + SQLiteParserCUME_DIST_ = 162 + SQLiteParserDENSE_RANK_ = 163 + SQLiteParserLAG_ = 164 + SQLiteParserLAST_VALUE_ = 165 + SQLiteParserLEAD_ = 166 + SQLiteParserNTH_VALUE_ = 167 + SQLiteParserNTILE_ = 168 + SQLiteParserPERCENT_RANK_ = 169 + SQLiteParserRANK_ = 170 + SQLiteParserROW_NUMBER_ = 171 + SQLiteParserGENERATED_ = 172 + SQLiteParserALWAYS_ = 173 + SQLiteParserSTORED_ = 174 + SQLiteParserTRUE_ = 175 + SQLiteParserFALSE_ = 176 + SQLiteParserWINDOW_ = 177 + SQLiteParserNULLS_ = 178 + SQLiteParserFIRST_ = 179 + SQLiteParserLAST_ = 180 + SQLiteParserFILTER_ = 181 + SQLiteParserGROUPS_ = 182 + SQLiteParserEXCLUDE_ = 183 + SQLiteParserTIES_ = 184 + SQLiteParserOTHERS_ = 185 + SQLiteParserDO_ = 186 + SQLiteParserNOTHING_ = 187 + SQLiteParserIDENTIFIER = 188 + SQLiteParserNUMERIC_LITERAL = 189 + SQLiteParserNUMBERED_BIND_PARAMETER = 190 + SQLiteParserNAMED_BIND_PARAMETER = 191 + SQLiteParserSTRING_LITERAL = 192 + SQLiteParserBLOB_LITERAL = 193 + SQLiteParserSINGLE_LINE_COMMENT = 194 + SQLiteParserMULTILINE_COMMENT = 195 + SQLiteParserSPACES = 196 + SQLiteParserUNEXPECTED_CHAR = 197 ) // SQLiteParser rules. @@ -1563,23 +1566,28 @@ type IParseContext interface { } type ParseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyParseContext() *ParseContext { var p = new(ParseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_parse return p } +func InitEmptyParseContext(p *ParseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_parse +} + func (*ParseContext) IsParseContext() {} func NewParseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParseContext { var p = new(ParseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_parse @@ -1655,35 +1663,19 @@ func (s *ParseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Parse() (localctx IParseContext) { - this := p - _ = this - localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 0, SQLiteParserRULE_parse) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(233) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6267743731445661694) != 0) || ((int64((_la-66)) & ^0x3f) == 0 && ((int64(1)<<(_la-66))&-7971300971697405919) != 0) || ((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&1101825) != 0) { + for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6912461228224806910) != 0) || ((int64((_la-65)) & ^0x3f) == 0 && ((int64(1)<<(_la-65))&-8430175552450592503) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&2203651) != 0) { { p.SetState(230) p.Sql_stmt_list() @@ -1691,14 +1683,31 @@ func (p *SQLiteParser) Parse() (localctx IParseContext) { p.SetState(235) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(236) p.Match(SQLiteParserEOF) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISql_stmt_listContext is an interface to support dynamic dispatch. @@ -1719,23 +1728,28 @@ type ISql_stmt_listContext interface { } type Sql_stmt_listContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySql_stmt_listContext() *Sql_stmt_listContext { var p = new(Sql_stmt_listContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_sql_stmt_list return p } +func InitEmptySql_stmt_listContext(p *Sql_stmt_listContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_sql_stmt_list +} + func (*Sql_stmt_listContext) IsSql_stmt_listContext() {} func NewSql_stmt_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmt_listContext { var p = new(Sql_stmt_listContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_sql_stmt_list @@ -1815,44 +1829,35 @@ func (s *Sql_stmt_listContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Sql_stmt_list() (localctx ISql_stmt_listContext) { - this := p - _ = this - localctx = NewSql_stmt_listContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 2, SQLiteParserRULE_sql_stmt_list) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) p.SetState(241) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserSCOL { { p.SetState(238) p.Match(SQLiteParserSCOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(243) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { @@ -1861,22 +1866,37 @@ func (p *SQLiteParser) Sql_stmt_list() (localctx ISql_stmt_listContext) { } p.SetState(253) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { p.SetState(246) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for ok := true; ok; ok = _la == SQLiteParserSCOL { { p.SetState(245) p.Match(SQLiteParserSCOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(248) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { @@ -1887,26 +1907,57 @@ func (p *SQLiteParser) Sql_stmt_list() (localctx ISql_stmt_listContext) { } p.SetState(255) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } p.SetState(259) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { p.SetState(256) p.Match(SQLiteParserSCOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } p.SetState(261) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISql_stmtContext is an interface to support dynamic dispatch. @@ -1950,23 +2001,28 @@ type ISql_stmtContext interface { } type Sql_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySql_stmtContext() *Sql_stmtContext { var p = new(Sql_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_sql_stmt return p } +func InitEmptySql_stmtContext(p *Sql_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_sql_stmt +} + func (*Sql_stmtContext) IsSql_stmtContext() {} func NewSql_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmtContext { var p = new(Sql_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_sql_stmt @@ -2393,51 +2449,50 @@ func (s *Sql_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Sql_stmt() (localctx ISql_stmtContext) { - this := p - _ = this - localctx = NewSql_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 4, SQLiteParserRULE_sql_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(267) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserEXPLAIN_ { { p.SetState(262) p.Match(SQLiteParserEXPLAIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(265) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserQUERY_ { { p.SetState(263) p.Match(SQLiteParserQUERY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(264) p.Match(SQLiteParserPLAN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -2445,7 +2500,11 @@ func (p *SQLiteParser) Sql_stmt() (localctx ISql_stmtContext) { } p.SetState(293) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) { case 1: { p.SetState(269) @@ -2590,9 +2649,21 @@ func (p *SQLiteParser) Sql_stmt() (localctx ISql_stmtContext) { p.Vacuum_stmt() } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAlter_table_stmtContext is an interface to support dynamic dispatch. @@ -2635,7 +2706,7 @@ type IAlter_table_stmtContext interface { } type Alter_table_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser old_column_name IColumn_nameContext new_column_name IColumn_nameContext @@ -2643,17 +2714,22 @@ type Alter_table_stmtContext struct { func NewEmptyAlter_table_stmtContext() *Alter_table_stmtContext { var p = new(Alter_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_alter_table_stmt return p } +func InitEmptyAlter_table_stmtContext(p *Alter_table_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_alter_table_stmt +} + func (*Alter_table_stmtContext) IsAlter_table_stmtContext() {} func NewAlter_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Alter_table_stmtContext { var p = new(Alter_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_alter_table_stmt @@ -2829,41 +2905,29 @@ func (s *Alter_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { - this := p - _ = this - localctx = NewAlter_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 6, SQLiteParserRULE_alter_table_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(295) p.Match(SQLiteParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(296) p.Match(SQLiteParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(300) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 { { p.SetState(297) p.Schema_name() @@ -2871,8 +2935,14 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { { p.SetState(298) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(302) @@ -2880,20 +2950,35 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { } p.SetState(325) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserRENAME_: { p.SetState(303) p.Match(SQLiteParserRENAME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(313) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 10, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 10, p.GetParserRuleContext()) { case 1: { p.SetState(304) p.Match(SQLiteParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(305) @@ -2904,12 +2989,18 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { p.SetState(307) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 9, p.GetParserRuleContext()) == 1 { { p.SetState(306) p.Match(SQLiteParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(309) @@ -2921,6 +3012,10 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { { p.SetState(310) p.Match(SQLiteParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(311) @@ -2930,22 +3025,34 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { localctx.(*Alter_table_stmtContext).new_column_name = _x } + case antlr.ATNInvalidAltNumber: + goto errorExit } case SQLiteParserADD_: { p.SetState(315) p.Match(SQLiteParserADD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(317) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 11, p.GetParserRuleContext()) == 1 { { p.SetState(316) p.Match(SQLiteParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(319) @@ -2956,16 +3063,26 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { { p.SetState(320) p.Match(SQLiteParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(322) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 { { p.SetState(321) p.Match(SQLiteParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(324) @@ -2973,10 +3090,21 @@ func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAnalyze_stmtContext is an interface to support dynamic dispatch. @@ -2997,23 +3125,28 @@ type IAnalyze_stmtContext interface { } type Analyze_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAnalyze_stmtContext() *Analyze_stmtContext { var p = new(Analyze_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_analyze_stmt return p } +func InitEmptyAnalyze_stmtContext(p *Analyze_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_analyze_stmt +} + func (*Analyze_stmtContext) IsAnalyze_stmtContext() {} func NewAnalyze_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Analyze_stmtContext { var p = new(Analyze_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_analyze_stmt @@ -3084,47 +3217,33 @@ func (s *Analyze_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Analyze_stmt() (localctx IAnalyze_stmtContext) { - this := p - _ = this - localctx = NewAnalyze_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 8, SQLiteParserRULE_analyze_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(327) p.Match(SQLiteParserANALYZE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(335) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 { { p.SetState(328) p.Schema_name() } - } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) == 2 { + } else if p.HasError() { // JIM + goto errorExit + } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 2 { p.SetState(332) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 { { p.SetState(329) p.Schema_name() @@ -3132,17 +3251,35 @@ func (p *SQLiteParser) Analyze_stmt() (localctx IAnalyze_stmtContext) { { p.SetState(330) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(334) p.Table_or_index_name() } + } else if p.HasError() { // JIM + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAttach_stmtContext is an interface to support dynamic dispatch. @@ -3164,23 +3301,28 @@ type IAttach_stmtContext interface { } type Attach_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAttach_stmtContext() *Attach_stmtContext { var p = new(Attach_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_attach_stmt return p } +func InitEmptyAttach_stmtContext(p *Attach_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_attach_stmt +} + func (*Attach_stmtContext) IsAttach_stmtContext() {} func NewAttach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Attach_stmtContext { var p = new(Attach_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_attach_stmt @@ -3255,42 +3397,32 @@ func (s *Attach_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Attach_stmt() (localctx IAttach_stmtContext) { - this := p - _ = this - localctx = NewAttach_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 10, SQLiteParserRULE_attach_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(337) p.Match(SQLiteParserATTACH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(339) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 { { p.SetState(338) p.Match(SQLiteParserDATABASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(341) @@ -3299,13 +3431,27 @@ func (p *SQLiteParser) Attach_stmt() (localctx IAttach_stmtContext) { { p.SetState(342) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(343) p.Schema_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IBegin_stmtContext is an interface to support dynamic dispatch. @@ -3328,23 +3474,28 @@ type IBegin_stmtContext interface { } type Begin_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyBegin_stmtContext() *Begin_stmtContext { var p = new(Begin_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_begin_stmt return p } +func InitEmptyBegin_stmtContext(p *Begin_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_begin_stmt +} + func (*Begin_stmtContext) IsBegin_stmtContext() {} func NewBegin_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Begin_stmtContext { var p = new(Begin_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_begin_stmt @@ -3411,44 +3562,32 @@ func (s *Begin_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Begin_stmt() (localctx IBegin_stmtContext) { - this := p - _ = this - localctx = NewBegin_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 12, SQLiteParserRULE_begin_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(345) p.Match(SQLiteParserBEGIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(347) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64((_la-58)) & ^0x3f) == 0 && ((int64(1)<<(_la-58))&16779265) != 0 { + if (int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0 { { p.SetState(346) _la = p.GetTokenStream().LA(1) - if !((int64((_la-58)) & ^0x3f) == 0 && ((int64(1)<<(_la-58))&16779265) != 0) { + if !((int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -3459,27 +3598,46 @@ func (p *SQLiteParser) Begin_stmt() (localctx IBegin_stmtContext) { } p.SetState(353) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTRANSACTION_ { { p.SetState(349) p.Match(SQLiteParserTRANSACTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(351) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 18, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext()) == 1 { { p.SetState(350) p.Transaction_name() } + } else if p.HasError() { // JIM + goto errorExit } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICommit_stmtContext is an interface to support dynamic dispatch. @@ -3499,23 +3657,28 @@ type ICommit_stmtContext interface { } type Commit_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCommit_stmtContext() *Commit_stmtContext { var p = new(Commit_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_commit_stmt return p } +func InitEmptyCommit_stmtContext(p *Commit_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_commit_stmt +} + func (*Commit_stmtContext) IsCommit_stmtContext() {} func NewCommit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Commit_stmtContext { var p = new(Commit_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_commit_stmt @@ -3558,29 +3721,10 @@ func (s *Commit_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Commit_stmt() (localctx ICommit_stmtContext) { - this := p - _ = this - localctx = NewCommit_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 14, SQLiteParserRULE_commit_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(355) @@ -3595,17 +3739,34 @@ func (p *SQLiteParser) Commit_stmt() (localctx ICommit_stmtContext) { } p.SetState(357) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTRANSACTION_ { { p.SetState(356) p.Match(SQLiteParserTRANSACTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IRollback_stmtContext is an interface to support dynamic dispatch. @@ -3627,23 +3788,28 @@ type IRollback_stmtContext interface { } type Rollback_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRollback_stmtContext() *Rollback_stmtContext { var p = new(Rollback_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_rollback_stmt return p } +func InitEmptyRollback_stmtContext(p *Rollback_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_rollback_stmt +} + func (*Rollback_stmtContext) IsRollback_stmtContext() {} func NewRollback_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Rollback_stmtContext { var p = new(Rollback_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_rollback_stmt @@ -3706,63 +3872,68 @@ func (s *Rollback_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Rollback_stmt() (localctx IRollback_stmtContext) { - this := p - _ = this - localctx = NewRollback_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 16, SQLiteParserRULE_rollback_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(359) p.Match(SQLiteParserROLLBACK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(361) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTRANSACTION_ { { p.SetState(360) p.Match(SQLiteParserTRANSACTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } p.SetState(368) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTO_ { { p.SetState(363) p.Match(SQLiteParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(365) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 22, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 22, p.GetParserRuleContext()) == 1 { { p.SetState(364) p.Match(SQLiteParserSAVEPOINT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(367) @@ -3771,7 +3942,17 @@ func (p *SQLiteParser) Rollback_stmt() (localctx IRollback_stmtContext) { } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISavepoint_stmtContext is an interface to support dynamic dispatch. @@ -3790,23 +3971,28 @@ type ISavepoint_stmtContext interface { } type Savepoint_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySavepoint_stmtContext() *Savepoint_stmtContext { var p = new(Savepoint_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_savepoint_stmt return p } +func InitEmptySavepoint_stmtContext(p *Savepoint_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_savepoint_stmt +} + func (*Savepoint_stmtContext) IsSavepoint_stmtContext() {} func NewSavepoint_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_stmtContext { var p = new(Savepoint_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_savepoint_stmt @@ -3857,39 +4043,33 @@ func (s *Savepoint_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Savepoint_stmt() (localctx ISavepoint_stmtContext) { - this := p - _ = this - localctx = NewSavepoint_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 18, SQLiteParserRULE_savepoint_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(370) p.Match(SQLiteParserSAVEPOINT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(371) p.Savepoint_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IRelease_stmtContext is an interface to support dynamic dispatch. @@ -3909,23 +4089,28 @@ type IRelease_stmtContext interface { } type Release_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRelease_stmtContext() *Release_stmtContext { var p = new(Release_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_release_stmt return p } +func InitEmptyRelease_stmtContext(p *Release_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_release_stmt +} + func (*Release_stmtContext) IsRelease_stmtContext() {} func NewRelease_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Release_stmtContext { var p = new(Release_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_release_stmt @@ -3980,49 +4165,49 @@ func (s *Release_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Release_stmt() (localctx IRelease_stmtContext) { - this := p - _ = this - localctx = NewRelease_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 20, SQLiteParserRULE_release_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(373) p.Match(SQLiteParserRELEASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(375) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 24, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 24, p.GetParserRuleContext()) == 1 { { p.SetState(374) p.Match(SQLiteParserSAVEPOINT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(377) p.Savepoint_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICreate_index_stmtContext is an interface to support dynamic dispatch. @@ -4058,23 +4243,28 @@ type ICreate_index_stmtContext interface { } type Create_index_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_index_stmtContext() *Create_index_stmtContext { var p = new(Create_index_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_create_index_stmt return p } +func InitEmptyCreate_index_stmtContext(p *Create_index_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_create_index_stmt +} + func (*Create_index_stmtContext) IsCreate_index_stmtContext() {} func NewCreate_index_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_index_stmtContext { var p = new(Create_index_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_index_stmt @@ -4262,71 +4452,81 @@ func (s *Create_index_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) { - this := p - _ = this - localctx = NewCreate_index_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 22, SQLiteParserRULE_create_index_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(379) p.Match(SQLiteParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(381) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserUNIQUE_ { { p.SetState(380) p.Match(SQLiteParserUNIQUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(383) p.Match(SQLiteParserINDEX_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(387) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 { { p.SetState(384) p.Match(SQLiteParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(385) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(386) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(392) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { { p.SetState(389) p.Schema_name() @@ -4334,8 +4534,14 @@ func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) { p.SetState(390) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(394) @@ -4344,6 +4550,10 @@ func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) { p.SetState(395) p.Match(SQLiteParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(396) @@ -4352,6 +4562,10 @@ func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) { p.SetState(397) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(398) @@ -4359,12 +4573,19 @@ func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) } p.SetState(403) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(399) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(400) @@ -4373,20 +4594,34 @@ func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) p.SetState(405) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(406) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(409) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(407) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(408) @@ -4395,7 +4630,17 @@ func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IIndexed_columnContext is an interface to support dynamic dispatch. @@ -4417,23 +4662,28 @@ type IIndexed_columnContext interface { } type Indexed_columnContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyIndexed_columnContext() *Indexed_columnContext { var p = new(Indexed_columnContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_indexed_column return p } +func InitEmptyIndexed_columnContext(p *Indexed_columnContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_indexed_column +} + func (*Indexed_columnContext) IsIndexed_columnContext() {} func NewIndexed_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Indexed_columnContext { var p = new(Indexed_columnContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_indexed_column @@ -4532,33 +4782,18 @@ func (s *Indexed_columnContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) { - this := p - _ = this - localctx = NewIndexed_columnContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 24, SQLiteParserRULE_indexed_column) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(413) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 30, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) { case 1: { p.SetState(411) @@ -4571,15 +4806,24 @@ func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) { p.expr(0) } + case antlr.ATNInvalidAltNumber: + goto errorExit } p.SetState(417) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOLLATE_ { { p.SetState(415) p.Match(SQLiteParserCOLLATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(416) @@ -4589,6 +4833,9 @@ func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) { } p.SetState(420) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { @@ -4599,7 +4846,17 @@ func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) { } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_optionContext is an interface to support dynamic dispatch. @@ -4625,24 +4882,29 @@ type ITable_optionContext interface { } type Table_optionContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser row_ROW_ID antlr.Token } func NewEmptyTable_optionContext() *Table_optionContext { var p = new(Table_optionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_option return p } +func InitEmptyTable_optionContext(p *Table_optionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_option +} + func (*Table_optionContext) IsTable_optionContext() {} func NewTable_optionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_optionContext { var p = new(Table_optionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_option @@ -4689,30 +4951,13 @@ func (s *Table_optionContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) { - this := p - _ = this - localctx = NewTable_optionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 26, SQLiteParserRULE_table_option) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.SetState(425) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserWITHOUT_: @@ -4720,6 +4965,10 @@ func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) { { p.SetState(422) p.Match(SQLiteParserWITHOUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(423) @@ -4727,6 +4976,10 @@ func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) { var _m = p.Match(SQLiteParserIDENTIFIER) localctx.(*Table_optionContext).row_ROW_ID = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserSTRICT_: @@ -4734,13 +4987,28 @@ func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) { { p.SetState(424) p.Match(SQLiteParserSTRICT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICreate_table_stmtContext is an interface to support dynamic dispatch. @@ -4779,23 +5047,28 @@ type ICreate_table_stmtContext interface { } type Create_table_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_table_stmtContext() *Create_table_stmtContext { var p = new(Create_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_create_table_stmt return p } +func InitEmptyCreate_table_stmtContext(p *Create_table_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_create_table_stmt +} + func (*Create_table_stmtContext) IsCreate_table_stmtContext() {} func NewCreate_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_table_stmtContext { var p = new(Create_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_table_stmt @@ -5049,38 +5322,26 @@ func (s *Create_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) { - this := p - _ = this - localctx = NewCreate_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 28, SQLiteParserRULE_create_table_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) { p.SetState(427) p.Match(SQLiteParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(429) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ { @@ -5100,29 +5361,47 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) { p.SetState(431) p.Match(SQLiteParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(435) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 35, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 35, p.GetParserRuleContext()) == 1 { { p.SetState(432) p.Match(SQLiteParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(433) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(434) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(440) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 36, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) == 1 { { p.SetState(437) p.Schema_name() @@ -5130,8 +5409,14 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) { p.SetState(438) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(442) @@ -5139,12 +5424,19 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) } p.SetState(472) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserOPEN_PAR: { p.SetState(443) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(444) @@ -5152,13 +5444,22 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) } p.SetState(449) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 37, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 1 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1+1 { { p.SetState(445) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(446) @@ -5168,16 +5469,29 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) } p.SetState(451) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 37, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } p.SetState(456) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(452) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(453) @@ -5186,14 +5500,24 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) p.SetState(458) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(459) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(468) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserSTRICT_ || _la == SQLiteParserWITHOUT_ { @@ -5203,12 +5527,19 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) } p.SetState(465) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(461) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(462) @@ -5217,6 +5548,9 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) p.SetState(467) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } @@ -5226,6 +5560,10 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) { p.SetState(470) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(471) @@ -5233,10 +5571,21 @@ func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IColumn_defContext is an interface to support dynamic dispatch. @@ -5257,23 +5606,28 @@ type IColumn_defContext interface { } type Column_defContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_defContext() *Column_defContext { var p = new(Column_defContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_column_def return p } +func InitEmptyColumn_defContext(p *Column_defContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_column_def +} + func (*Column_defContext) IsColumn_defContext() {} func NewColumn_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_defContext { var p = new(Column_defContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_def @@ -5377,29 +5731,9 @@ func (s *Column_defContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Column_def() (localctx IColumn_defContext) { - this := p - _ = this - localctx = NewColumn_defContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 30, SQLiteParserRULE_column_def) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - var _alt int + var _la int p.EnterOuterAlt(localctx, 1) { @@ -5409,31 +5743,47 @@ func (p *SQLiteParser) Column_def() (localctx IColumn_defContext) { p.SetState(476) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 42, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 42, p.GetParserRuleContext()) == 1 { { p.SetState(475) p.Type_name() } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(481) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext()) - - for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { - if _alt == 1 { - { - p.SetState(478) - p.Column_constraint() - } + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&290693316557668352) != 0) || ((int64((_la-104)) & ^0x3f) == 0 && ((int64(1)<<(_la-104))&549755848705) != 0) || _la == SQLiteParserGENERATED_ { + { + p.SetState(478) + p.Column_constraint() } + p.SetState(483) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IType_nameContext is an interface to support dynamic dispatch. @@ -5457,23 +5807,28 @@ type IType_nameContext interface { } type Type_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyType_nameContext() *Type_nameContext { var p = new(Type_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_type_name return p } +func InitEmptyType_nameContext(p *Type_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_type_name +} + func (*Type_nameContext) IsType_nameContext() {} func NewType_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_nameContext { var p = new(Type_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_type_name @@ -5598,33 +5953,16 @@ func (s *Type_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { - this := p - _ = this - localctx = NewType_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 32, SQLiteParserRULE_type_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) p.SetState(485) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _alt = 1 + 1 for ok := true; ok; ok = _alt != 1 && _alt != antlr.ATNInvalidAltNumber { switch _alt { @@ -5635,20 +5973,28 @@ func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } p.SetState(487) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 44, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 44, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } p.SetState(499) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 45, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 45, p.GetParserRuleContext()) == 1 { { p.SetState(489) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(490) @@ -5657,12 +6003,22 @@ func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { { p.SetState(491) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 45, p.GetParserRuleContext()) == 2 { + } else if p.HasError() { // JIM + goto errorExit + } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 45, p.GetParserRuleContext()) == 2 { { p.SetState(493) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(494) @@ -5671,6 +6027,10 @@ func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { { p.SetState(495) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(496) @@ -5679,11 +6039,27 @@ func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { { p.SetState(497) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IColumn_constraintContext is an interface to support dynamic dispatch. @@ -5725,23 +6101,28 @@ type IColumn_constraintContext interface { } type Column_constraintContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_constraintContext() *Column_constraintContext { var p = new(Column_constraintContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_column_constraint return p } +func InitEmptyColumn_constraintContext(p *Column_constraintContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_column_constraint +} + func (*Column_constraintContext) IsColumn_constraintContext() {} func NewColumn_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_constraintContext { var p = new(Column_constraintContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_constraint @@ -5968,38 +6349,26 @@ func (s *Column_constraintContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { - this := p - _ = this - localctx = NewColumn_constraintContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 34, SQLiteParserRULE_column_constraint) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(503) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCONSTRAINT_ { { p.SetState(501) p.Match(SQLiteParserCONSTRAINT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(502) @@ -6009,19 +6378,33 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) } p.SetState(552) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserPRIMARY_: { p.SetState(505) p.Match(SQLiteParserPRIMARY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(506) p.Match(SQLiteParserKEY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(508) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { @@ -6033,6 +6416,9 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) } p.SetState(511) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserON_ { @@ -6044,12 +6430,19 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) } p.SetState(514) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAUTOINCREMENT_ { { p.SetState(513) p.Match(SQLiteParserAUTOINCREMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -6057,29 +6450,48 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) case SQLiteParserNOT_, SQLiteParserUNIQUE_: p.SetState(519) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserNOT_: { p.SetState(516) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(517) p.Match(SQLiteParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserUNIQUE_: { p.SetState(518) p.Match(SQLiteParserUNIQUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } p.SetState(522) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserON_ { @@ -6094,10 +6506,18 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { p.SetState(524) p.Match(SQLiteParserCHECK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(525) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(526) @@ -6106,16 +6526,28 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { p.SetState(527) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserDEFAULT_: { p.SetState(529) p.Match(SQLiteParserDEFAULT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(536) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 52, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 52, p.GetParserRuleContext()) { case 1: { p.SetState(530) @@ -6132,6 +6564,10 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { p.SetState(532) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(533) @@ -6140,14 +6576,24 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { p.SetState(534) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } case SQLiteParserCOLLATE_: { p.SetState(538) p.Match(SQLiteParserCOLLATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(539) @@ -6163,26 +6609,45 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) case SQLiteParserAS_, SQLiteParserGENERATED_: p.SetState(543) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserGENERATED_ { { p.SetState(541) p.Match(SQLiteParserGENERATED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(542) p.Match(SQLiteParserALWAYS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(545) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(546) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(547) @@ -6191,9 +6656,16 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { p.SetState(548) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(550) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserVIRTUAL_ || _la == SQLiteParserSTORED_ { @@ -6212,10 +6684,21 @@ func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISigned_numberContext is an interface to support dynamic dispatch. @@ -6235,23 +6718,28 @@ type ISigned_numberContext interface { } type Signed_numberContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySigned_numberContext() *Signed_numberContext { var p = new(Signed_numberContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_signed_number return p } +func InitEmptySigned_numberContext(p *Signed_numberContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_signed_number +} + func (*Signed_numberContext) IsSigned_numberContext() {} func NewSigned_numberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Signed_numberContext { var p = new(Signed_numberContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_signed_number @@ -6294,32 +6782,16 @@ func (s *Signed_numberContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Signed_number() (localctx ISigned_numberContext) { - this := p - _ = this - localctx = NewSigned_numberContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 36, SQLiteParserRULE_signed_number) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(555) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPLUS || _la == SQLiteParserMINUS { @@ -6339,9 +6811,23 @@ func (p *SQLiteParser) Signed_number() (localctx ISigned_numberContext) { { p.SetState(557) p.Match(SQLiteParserNUMERIC_LITERAL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_constraintContext is an interface to support dynamic dispatch. @@ -6376,23 +6862,28 @@ type ITable_constraintContext interface { } type Table_constraintContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_constraintContext() *Table_constraintContext { var p = new(Table_constraintContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_constraint return p } +func InitEmptyTable_constraintContext(p *Table_constraintContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_constraint +} + func (*Table_constraintContext) IsTable_constraintContext() {} func NewTable_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_constraintContext { var p = new(Table_constraintContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_constraint @@ -6609,38 +7100,26 @@ func (s *Table_constraintContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { - this := p - _ = this - localctx = NewTable_constraintContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 38, SQLiteParserRULE_table_constraint) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(561) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCONSTRAINT_ { { p.SetState(559) p.Match(SQLiteParserCONSTRAINT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(560) @@ -6650,35 +7129,58 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { } p.SetState(600) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserPRIMARY_, SQLiteParserUNIQUE_: p.SetState(566) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserPRIMARY_: { p.SetState(563) p.Match(SQLiteParserPRIMARY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(564) p.Match(SQLiteParserKEY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserUNIQUE_: { p.SetState(565) p.Match(SQLiteParserUNIQUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } { p.SetState(568) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(569) @@ -6686,12 +7188,19 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { } p.SetState(574) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(570) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(571) @@ -6700,14 +7209,24 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { p.SetState(576) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(577) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(579) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserON_ { @@ -6722,10 +7241,18 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { { p.SetState(581) p.Match(SQLiteParserCHECK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(582) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(583) @@ -6734,20 +7261,36 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { { p.SetState(584) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserFOREIGN_: { p.SetState(586) p.Match(SQLiteParserFOREIGN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(587) p.Match(SQLiteParserKEY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(588) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(589) @@ -6755,12 +7298,19 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { } p.SetState(594) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(590) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(591) @@ -6769,11 +7319,18 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { p.SetState(596) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(597) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(598) @@ -6781,10 +7338,21 @@ func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IForeign_key_clauseContext is an interface to support dynamic dispatch. @@ -6838,23 +7406,28 @@ type IForeign_key_clauseContext interface { } type Foreign_key_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyForeign_key_clauseContext() *Foreign_key_clauseContext { var p = new(Foreign_key_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_foreign_key_clause return p } +func InitEmptyForeign_key_clauseContext(p *Foreign_key_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_foreign_key_clause +} + func (*Foreign_key_clauseContext) IsForeign_key_clauseContext() {} func NewForeign_key_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_key_clauseContext { var p = new(Foreign_key_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_foreign_key_clause @@ -7111,33 +7684,18 @@ func (s *Foreign_key_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext) { - this := p - _ = this - localctx = NewForeign_key_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 40, SQLiteParserRULE_foreign_key_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(602) p.Match(SQLiteParserREFERENCES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(603) @@ -7145,12 +7703,19 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext } p.SetState(615) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { p.SetState(604) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(605) @@ -7158,12 +7723,19 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext } p.SetState(610) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(606) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(607) @@ -7172,27 +7744,44 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext p.SetState(612) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(613) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } p.SetState(631) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserMATCH_ || _la == SQLiteParserON_ { p.SetState(629) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserON_: { p.SetState(617) p.Match(SQLiteParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(618) @@ -7207,12 +7796,19 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext } p.SetState(625) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserSET_: { p.SetState(619) p.Match(SQLiteParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(620) @@ -7230,32 +7826,53 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext { p.SetState(621) p.Match(SQLiteParserCASCADE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserRESTRICT_: { p.SetState(622) p.Match(SQLiteParserRESTRICT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserNO_: { p.SetState(623) p.Match(SQLiteParserNO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(624) p.Match(SQLiteParserACTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } case SQLiteParserMATCH_: { p.SetState(627) p.Match(SQLiteParserMATCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(628) @@ -7263,40 +7880,62 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } p.SetState(633) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } p.SetState(642) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 70, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 70, p.GetParserRuleContext()) == 1 { p.SetState(635) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { p.SetState(634) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(637) p.Match(SQLiteParserDEFERRABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(640) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserINITIALLY_ { { p.SetState(638) p.Match(SQLiteParserINITIALLY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(639) @@ -7312,9 +7951,21 @@ func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext } + } else if p.HasError() { // JIM + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IConflict_clauseContext is an interface to support dynamic dispatch. @@ -7338,23 +7989,28 @@ type IConflict_clauseContext interface { } type Conflict_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyConflict_clauseContext() *Conflict_clauseContext { var p = new(Conflict_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_conflict_clause return p } +func InitEmptyConflict_clauseContext(p *Conflict_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_conflict_clause +} + func (*Conflict_clauseContext) IsConflict_clauseContext() {} func NewConflict_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Conflict_clauseContext { var p = new(Conflict_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_conflict_clause @@ -7413,43 +8069,32 @@ func (s *Conflict_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Conflict_clause() (localctx IConflict_clauseContext) { - this := p - _ = this - localctx = NewConflict_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 42, SQLiteParserRULE_conflict_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(644) p.Match(SQLiteParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(645) p.Match(SQLiteParserCONFLICT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(646) _la = p.GetTokenStream().LA(1) - if !(_la == SQLiteParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) { + if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -7457,7 +8102,17 @@ func (p *SQLiteParser) Conflict_clause() (localctx IConflict_clauseContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICreate_trigger_stmtContext is an interface to support dynamic dispatch. @@ -7515,23 +8170,28 @@ type ICreate_trigger_stmtContext interface { } type Create_trigger_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_trigger_stmtContext() *Create_trigger_stmtContext { var p = new(Create_trigger_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_create_trigger_stmt return p } +func InitEmptyCreate_trigger_stmtContext(p *Create_trigger_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_create_trigger_stmt +} + func (*Create_trigger_stmtContext) IsCreate_trigger_stmtContext() {} func NewCreate_trigger_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_trigger_stmtContext { var p = new(Create_trigger_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_trigger_stmt @@ -7939,36 +8599,24 @@ func (s *Create_trigger_stmtContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtContext) { - this := p - _ = this - localctx = NewCreate_trigger_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 44, SQLiteParserRULE_create_trigger_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(648) p.Match(SQLiteParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(650) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ { @@ -7988,29 +8636,47 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte { p.SetState(652) p.Match(SQLiteParserTRIGGER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(656) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 72, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 72, p.GetParserRuleContext()) == 1 { { p.SetState(653) p.Match(SQLiteParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(654) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(655) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(661) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 73, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 73, p.GetParserRuleContext()) == 1 { { p.SetState(658) p.Schema_name() @@ -8018,8 +8684,14 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte { p.SetState(659) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(663) @@ -8027,28 +8699,46 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte } p.SetState(668) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserBEFORE_: { p.SetState(664) p.Match(SQLiteParserBEFORE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserAFTER_: { p.SetState(665) p.Match(SQLiteParserAFTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserINSTEAD_: { p.SetState(666) p.Match(SQLiteParserINSTEAD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(667) p.Match(SQLiteParserOF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserDELETE_, SQLiteParserINSERT_, SQLiteParserUPDATE_: @@ -8057,33 +8747,55 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte } p.SetState(684) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserDELETE_: { p.SetState(670) p.Match(SQLiteParserDELETE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserINSERT_: { p.SetState(671) p.Match(SQLiteParserINSERT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserUPDATE_: { p.SetState(672) p.Match(SQLiteParserUPDATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(682) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOF_ { { p.SetState(673) p.Match(SQLiteParserOF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(674) @@ -8091,12 +8803,19 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte } p.SetState(679) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(675) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(676) @@ -8105,17 +8824,25 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte p.SetState(681) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } { p.SetState(686) p.Match(SQLiteParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(687) @@ -8123,31 +8850,53 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte } p.SetState(691) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFOR_ { { p.SetState(688) p.Match(SQLiteParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(689) p.Match(SQLiteParserEACH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(690) p.Match(SQLiteParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } p.SetState(695) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHEN_ { { p.SetState(693) p.Match(SQLiteParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(694) @@ -8158,15 +8907,26 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte { p.SetState(697) p.Match(SQLiteParserBEGIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(706) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - for ok := true; ok; ok = _la == SQLiteParserDEFAULT_ || _la == SQLiteParserDELETE_ || ((int64((_la-88)) & ^0x3f) == 0 && ((int64(1)<<(_la-88))&4773820020239106049) != 0) { + for ok := true; ok; ok = _la == SQLiteParserDELETE_ || ((int64((_la-90)) & ^0x3f) == 0 && ((int64(1)<<(_la-90))&4773820020239106049) != 0) { p.SetState(702) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 80, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 80, p.GetParserRuleContext()) { case 1: { p.SetState(698) @@ -8191,22 +8951,45 @@ func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtConte p.Select_stmt() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { p.SetState(704) p.Match(SQLiteParserSCOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(708) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(710) p.Match(SQLiteParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICreate_view_stmtContext is an interface to support dynamic dispatch. @@ -8241,23 +9024,28 @@ type ICreate_view_stmtContext interface { } type Create_view_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_view_stmtContext() *Create_view_stmtContext { var p = new(Create_view_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_create_view_stmt return p } +func InitEmptyCreate_view_stmtContext(p *Create_view_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_create_view_stmt +} + func (*Create_view_stmtContext) IsCreate_view_stmtContext() {} func NewCreate_view_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_view_stmtContext { var p = new(Create_view_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_view_stmt @@ -8429,36 +9217,24 @@ func (s *Create_view_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { - this := p - _ = this - localctx = NewCreate_view_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 46, SQLiteParserRULE_create_view_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(712) p.Match(SQLiteParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(714) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ { @@ -8478,29 +9254,47 @@ func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { { p.SetState(716) p.Match(SQLiteParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(720) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 83, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 83, p.GetParserRuleContext()) == 1 { { p.SetState(717) p.Match(SQLiteParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(718) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(719) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(725) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 84, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 84, p.GetParserRuleContext()) == 1 { { p.SetState(722) p.Schema_name() @@ -8508,8 +9302,14 @@ func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { { p.SetState(723) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(727) @@ -8517,12 +9317,19 @@ func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { } p.SetState(739) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { p.SetState(728) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(729) @@ -8530,12 +9337,19 @@ func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { } p.SetState(734) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(730) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(731) @@ -8544,24 +9358,45 @@ func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { p.SetState(736) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(737) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(741) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(742) p.Select_stmt() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICreate_virtual_table_stmtContext is an interface to support dynamic dispatch. @@ -8595,23 +9430,28 @@ type ICreate_virtual_table_stmtContext interface { } type Create_virtual_table_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_virtual_table_stmtContext() *Create_virtual_table_stmtContext { var p = new(Create_virtual_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt return p } +func InitEmptyCreate_virtual_table_stmtContext(p *Create_virtual_table_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt +} + func (*Create_virtual_table_stmtContext) IsCreate_virtual_table_stmtContext() {} func NewCreate_virtual_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_virtual_table_stmtContext { var p = new(Create_virtual_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt @@ -8779,64 +9619,71 @@ func (s *Create_virtual_table_stmtContext) ExitRule(listener antlr.ParseTreeList } func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_table_stmtContext) { - this := p - _ = this - localctx = NewCreate_virtual_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 48, SQLiteParserRULE_create_virtual_table_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(744) p.Match(SQLiteParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(745) p.Match(SQLiteParserVIRTUAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(746) p.Match(SQLiteParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(750) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 87, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 87, p.GetParserRuleContext()) == 1 { { p.SetState(747) p.Match(SQLiteParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(748) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(749) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(755) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 88, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 88, p.GetParserRuleContext()) == 1 { { p.SetState(752) p.Schema_name() @@ -8844,8 +9691,14 @@ func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_tab { p.SetState(753) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(757) @@ -8854,6 +9707,10 @@ func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_tab { p.SetState(758) p.Match(SQLiteParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(759) @@ -8861,12 +9718,19 @@ func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_tab } p.SetState(771) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { p.SetState(760) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(761) @@ -8874,12 +9738,19 @@ func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_tab } p.SetState(766) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(762) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(763) @@ -8888,16 +9759,33 @@ func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_tab p.SetState(768) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(769) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IWith_clauseContext is an interface to support dynamic dispatch. @@ -8928,23 +9816,28 @@ type IWith_clauseContext interface { } type With_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWith_clauseContext() *With_clauseContext { var p = new(With_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_with_clause return p } +func InitEmptyWith_clauseContext(p *With_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_with_clause +} + func (*With_clauseContext) IsWith_clauseContext() {} func NewWith_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *With_clauseContext { var p = new(With_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_with_clause @@ -9097,43 +9990,34 @@ func (s *With_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { - this := p - _ = this - localctx = NewWith_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 50, SQLiteParserRULE_with_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(773) p.Match(SQLiteParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(775) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 91, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 91, p.GetParserRuleContext()) == 1 { { p.SetState(774) p.Match(SQLiteParserRECURSIVE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(777) @@ -9142,10 +10026,18 @@ func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { { p.SetState(778) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(779) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(780) @@ -9154,15 +10046,26 @@ func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { { p.SetState(781) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(791) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(782) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(783) @@ -9171,10 +10074,18 @@ func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { { p.SetState(784) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(785) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(786) @@ -9183,14 +10094,31 @@ func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { { p.SetState(787) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(793) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICte_table_nameContext is an interface to support dynamic dispatch. @@ -9214,23 +10142,28 @@ type ICte_table_nameContext interface { } type Cte_table_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCte_table_nameContext() *Cte_table_nameContext { var p = new(Cte_table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_cte_table_name return p } +func InitEmptyCte_table_nameContext(p *Cte_table_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_cte_table_name +} + func (*Cte_table_nameContext) IsCte_table_nameContext() {} func NewCte_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Cte_table_nameContext { var p = new(Cte_table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_cte_table_name @@ -9334,29 +10267,10 @@ func (s *Cte_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) { - this := p - _ = this - localctx = NewCte_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 52, SQLiteParserRULE_cte_table_name) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(794) @@ -9364,12 +10278,19 @@ func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) { } p.SetState(806) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { p.SetState(795) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(796) @@ -9377,12 +10298,19 @@ func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) { } p.SetState(801) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(797) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(798) @@ -9391,16 +10319,33 @@ func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) { p.SetState(803) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(804) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IRecursive_cteContext is an interface to support dynamic dispatch. @@ -9425,23 +10370,28 @@ type IRecursive_cteContext interface { } type Recursive_cteContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRecursive_cteContext() *Recursive_cteContext { var p = new(Recursive_cteContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_recursive_cte return p } +func InitEmptyRecursive_cteContext(p *Recursive_cteContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_recursive_cte +} + func (*Recursive_cteContext) IsRecursive_cteContext() {} func NewRecursive_cteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive_cteContext { var p = new(Recursive_cteContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_recursive_cte @@ -9540,29 +10490,10 @@ func (s *Recursive_cteContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) { - this := p - _ = this - localctx = NewRecursive_cteContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 54, SQLiteParserRULE_recursive_cte) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(808) @@ -9571,10 +10502,18 @@ func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) { { p.SetState(809) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(810) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(811) @@ -9583,15 +10522,26 @@ func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) { { p.SetState(812) p.Match(SQLiteParserUNION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(814) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserALL_ { { p.SetState(813) p.Match(SQLiteParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -9602,9 +10552,23 @@ func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) { { p.SetState(817) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICommon_table_expressionContext is an interface to support dynamic dispatch. @@ -9632,23 +10596,28 @@ type ICommon_table_expressionContext interface { } type Common_table_expressionContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCommon_table_expressionContext() *Common_table_expressionContext { var p = new(Common_table_expressionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_common_table_expression return p } +func InitEmptyCommon_table_expressionContext(p *Common_table_expressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_common_table_expression +} + func (*Common_table_expressionContext) IsCommon_table_expressionContext() {} func NewCommon_table_expressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_expressionContext { var p = new(Common_table_expressionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_common_table_expression @@ -9780,29 +10749,10 @@ func (s *Common_table_expressionContext) ExitRule(listener antlr.ParseTreeListen } func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_expressionContext) { - this := p - _ = this - localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 56, SQLiteParserRULE_common_table_expression) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(819) @@ -9810,12 +10760,19 @@ func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_express } p.SetState(831) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { p.SetState(820) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(821) @@ -9823,12 +10780,19 @@ func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_express } p.SetState(826) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(822) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(823) @@ -9837,21 +10801,36 @@ func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_express p.SetState(828) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(829) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(833) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(834) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(835) @@ -9860,9 +10839,23 @@ func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_express { p.SetState(836) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IReturning_clauseContext is an interface to support dynamic dispatch. @@ -9890,23 +10883,28 @@ type IReturning_clauseContext interface { } type Returning_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyReturning_clauseContext() *Returning_clauseContext { var p = new(Returning_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_returning_clause return p } +func InitEmptyReturning_clauseContext(p *Returning_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_returning_clause +} + func (*Returning_clauseContext) IsReturning_clauseContext() {} func NewReturning_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Returning_clauseContext { var p = new(Returning_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_returning_clause @@ -10047,43 +11045,35 @@ func (s *Returning_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { - this := p - _ = this - localctx = NewReturning_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 58, SQLiteParserRULE_returning_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(838) p.Match(SQLiteParserRETURNING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(847) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserSTAR: { p.SetState(839) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: @@ -10093,17 +11083,27 @@ func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { } p.SetState(845) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { p.SetState(842) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(841) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -10115,25 +11115,40 @@ func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } p.SetState(862) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(849) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(858) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserSTAR: { p.SetState(850) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: @@ -10143,17 +11158,27 @@ func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { } p.SetState(856) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { p.SetState(853) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(852) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -10165,15 +11190,29 @@ func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } p.SetState(864) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IDelete_stmtContext is an interface to support dynamic dispatch. @@ -10197,23 +11236,28 @@ type IDelete_stmtContext interface { } type Delete_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDelete_stmtContext() *Delete_stmtContext { var p = new(Delete_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_delete_stmt return p } +func InitEmptyDelete_stmtContext(p *Delete_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_delete_stmt +} + func (*Delete_stmtContext) IsDelete_stmtContext() {} func NewDelete_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmtContext { var p = new(Delete_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_delete_stmt @@ -10320,32 +11364,16 @@ func (s *Delete_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { - this := p - _ = this - localctx = NewDelete_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 60, SQLiteParserRULE_delete_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(866) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { @@ -10358,10 +11386,18 @@ func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { { p.SetState(868) p.Match(SQLiteParserDELETE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(869) p.Match(SQLiteParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(870) @@ -10369,12 +11405,19 @@ func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { } p.SetState(873) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(871) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(872) @@ -10384,6 +11427,9 @@ func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { } p.SetState(876) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserRETURNING_ { @@ -10394,7 +11440,17 @@ func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IDelete_stmt_limitedContext is an interface to support dynamic dispatch. @@ -10420,23 +11476,28 @@ type IDelete_stmt_limitedContext interface { } type Delete_stmt_limitedContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDelete_stmt_limitedContext() *Delete_stmt_limitedContext { var p = new(Delete_stmt_limitedContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_delete_stmt_limited return p } +func InitEmptyDelete_stmt_limitedContext(p *Delete_stmt_limitedContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_delete_stmt_limited +} + func (*Delete_stmt_limitedContext) IsDelete_stmt_limitedContext() {} func NewDelete_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmt_limitedContext { var p = new(Delete_stmt_limitedContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_delete_stmt_limited @@ -10575,32 +11636,16 @@ func (s *Delete_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedContext) { - this := p - _ = this - localctx = NewDelete_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 62, SQLiteParserRULE_delete_stmt_limited) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(879) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { @@ -10613,10 +11658,18 @@ func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedConte { p.SetState(881) p.Match(SQLiteParserDELETE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(882) p.Match(SQLiteParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(883) @@ -10624,12 +11677,19 @@ func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedConte } p.SetState(886) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(884) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(885) @@ -10639,11 +11699,17 @@ func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedConte } p.SetState(892) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ { p.SetState(889) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { @@ -10661,6 +11727,9 @@ func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedConte } p.SetState(895) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserRETURNING_ { @@ -10671,7 +11740,17 @@ func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedConte } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IDetach_stmtContext is an interface to support dynamic dispatch. @@ -10691,23 +11770,28 @@ type IDetach_stmtContext interface { } type Detach_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDetach_stmtContext() *Detach_stmtContext { var p = new(Detach_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_detach_stmt return p } +func InitEmptyDetach_stmtContext(p *Detach_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_detach_stmt +} + func (*Detach_stmtContext) IsDetach_stmtContext() {} func NewDetach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Detach_stmtContext { var p = new(Detach_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_detach_stmt @@ -10762,49 +11846,49 @@ func (s *Detach_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Detach_stmt() (localctx IDetach_stmtContext) { - this := p - _ = this - localctx = NewDetach_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 64, SQLiteParserRULE_detach_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(897) p.Match(SQLiteParserDETACH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(899) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 113, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 113, p.GetParserRuleContext()) == 1 { { p.SetState(898) p.Match(SQLiteParserDATABASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(901) p.Schema_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IDrop_stmtContext is an interface to support dynamic dispatch. @@ -10837,24 +11921,29 @@ type IDrop_stmtContext interface { } type Drop_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser object antlr.Token } func NewEmptyDrop_stmtContext() *Drop_stmtContext { var p = new(Drop_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_drop_stmt return p } +func InitEmptyDrop_stmtContext(p *Drop_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_drop_stmt +} + func (*Drop_stmtContext) IsDrop_stmtContext() {} func NewDrop_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Drop_stmtContext { var p = new(Drop_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_drop_stmt @@ -10953,33 +12042,18 @@ func (s *Drop_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) { - this := p - _ = this - localctx = NewDrop_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 66, SQLiteParserRULE_drop_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(903) p.Match(SQLiteParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(904) @@ -10990,7 +12064,7 @@ func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) { _la = p.GetTokenStream().LA(1) - if !((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&4648277765399773185) != 0) { + if !((int64((_la-86)) & ^0x3f) == 0 && ((int64(1)<<(_la-86))&4648277765399773185) != 0) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*Drop_stmtContext).object = _ri @@ -11002,21 +12076,31 @@ func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) { p.SetState(907) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 114, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 114, p.GetParserRuleContext()) == 1 { { p.SetState(905) p.Match(SQLiteParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(906) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(912) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 115, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 115, p.GetParserRuleContext()) == 1 { { p.SetState(909) p.Schema_name() @@ -11024,15 +12108,31 @@ func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) { { p.SetState(910) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(914) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IExprContext is an interface to support dynamic dispatch. @@ -11046,23 +12146,28 @@ type IExprContext interface { } type ExprContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyExprContext() *ExprContext { var p = new(ExprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_expr return p } +func InitEmptyExprContext(p *ExprContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_expr +} + func (*ExprContext) IsExprContext() {} func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext { var p = new(ExprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_expr @@ -11072,8 +12177,8 @@ func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokin func (s *ExprContext) GetParser() antlr.Parser { return s.parser } -func (s *ExprContext) CopyFrom(ctx *ExprContext) { - s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext) +func (s *ExprContext) CopyAll(ctx *ExprContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) } func (s *ExprContext) GetRuleContext() antlr.RuleContext { @@ -11085,15 +12190,15 @@ func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s } type Expr_caseContext struct { - *ExprContext + ExprContext } func NewExpr_caseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_caseContext { var p = new(Expr_caseContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -11184,15 +12289,15 @@ func (s *Expr_caseContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_raiseContext struct { - *ExprContext + ExprContext } func NewExpr_raiseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_raiseContext { var p = new(Expr_raiseContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -11230,15 +12335,15 @@ func (s *Expr_raiseContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_functionContext struct { - *ExprContext + ExprContext } func NewExpr_functionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_functionContext { var p = new(Expr_functionContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -11373,15 +12478,15 @@ func (s *Expr_functionContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_comparisonContext struct { - *ExprContext + ExprContext } func NewExpr_comparisonContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_comparisonContext { var p = new(Expr_comparisonContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -11523,25 +12628,25 @@ func (s *Expr_comparisonContext) ExitRule(listener antlr.ParseTreeListener) { } } -type Expr_binaryContext struct { - *ExprContext +type Expr_boolContext struct { + ExprContext } -func NewExpr_binaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_binaryContext { - var p = new(Expr_binaryContext) +func NewExpr_boolContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_boolContext { + var p = new(Expr_boolContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } -func (s *Expr_binaryContext) GetRuleContext() antlr.RuleContext { +func (s *Expr_boolContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Expr_binaryContext) AllExpr() []IExprContext { +func (s *Expr_boolContext) AllExpr() []IExprContext { children := s.GetChildren() len := 0 for _, ctx := range children { @@ -11562,7 +12667,7 @@ func (s *Expr_binaryContext) AllExpr() []IExprContext { return tst } -func (s *Expr_binaryContext) Expr(i int) IExprContext { +func (s *Expr_boolContext) Expr(i int) IExprContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { @@ -11582,54 +12687,75 @@ func (s *Expr_binaryContext) Expr(i int) IExprContext { return t.(IExprContext) } -func (s *Expr_binaryContext) PIPE2() antlr.TerminalNode { - return s.GetToken(SQLiteParserPIPE2, 0) -} - -func (s *Expr_binaryContext) AND_() antlr.TerminalNode { +func (s *Expr_boolContext) AND_() antlr.TerminalNode { return s.GetToken(SQLiteParserAND_, 0) } -func (s *Expr_binaryContext) OR_() antlr.TerminalNode { +func (s *Expr_boolContext) OR_() antlr.TerminalNode { return s.GetToken(SQLiteParserOR_, 0) } -func (s *Expr_binaryContext) EnterRule(listener antlr.ParseTreeListener) { +func (s *Expr_boolContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_binary(s) + listenerT.EnterExpr_bool(s) } } -func (s *Expr_binaryContext) ExitRule(listener antlr.ParseTreeListener) { +func (s *Expr_boolContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_binary(s) + listenerT.ExitExpr_bool(s) } } -type Expr_literalContext struct { - *ExprContext +type Expr_binaryContext struct { + ExprContext } -func NewExpr_literalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_literalContext { - var p = new(Expr_literalContext) +func NewExpr_binaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_binaryContext { + var p = new(Expr_binaryContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } -func (s *Expr_literalContext) GetRuleContext() antlr.RuleContext { +func (s *Expr_binaryContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Expr_literalContext) Literal_value() ILiteral_valueContext { +func (s *Expr_binaryContext) AllExpr() []IExprContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExprContext); ok { + len++ + } + } + + tst := make([]IExprContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExprContext); ok { + tst[i] = t.(IExprContext) + i++ + } + } + + return tst +} + +func (s *Expr_binaryContext) Expr(i int) IExprContext { var t antlr.RuleContext + j := 0 for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILiteral_valueContext); ok { - t = ctx.(antlr.RuleContext) - break + if _, ok := ctx.(IExprContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ } } @@ -11637,33 +12763,111 @@ func (s *Expr_literalContext) Literal_value() ILiteral_valueContext { return nil } - return t.(ILiteral_valueContext) + return t.(IExprContext) } -func (s *Expr_literalContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_literal(s) - } +func (s *Expr_binaryContext) PIPE2() antlr.TerminalNode { + return s.GetToken(SQLiteParserPIPE2, 0) } -func (s *Expr_literalContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_literal(s) - } +func (s *Expr_binaryContext) PTR() antlr.TerminalNode { + return s.GetToken(SQLiteParserPTR, 0) } -type Expr_castContext struct { - *ExprContext +func (s *Expr_binaryContext) PTR2() antlr.TerminalNode { + return s.GetToken(SQLiteParserPTR2, 0) } -func NewExpr_castContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_castContext { - var p = new(Expr_castContext) - - p.ExprContext = NewEmptyExprContext() - p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) +func (s *Expr_binaryContext) STAR() antlr.TerminalNode { + return s.GetToken(SQLiteParserSTAR, 0) +} - return p +func (s *Expr_binaryContext) DIV() antlr.TerminalNode { + return s.GetToken(SQLiteParserDIV, 0) +} + +func (s *Expr_binaryContext) MOD() antlr.TerminalNode { + return s.GetToken(SQLiteParserMOD, 0) +} + +func (s *Expr_binaryContext) PLUS() antlr.TerminalNode { + return s.GetToken(SQLiteParserPLUS, 0) +} + +func (s *Expr_binaryContext) MINUS() antlr.TerminalNode { + return s.GetToken(SQLiteParserMINUS, 0) +} + +func (s *Expr_binaryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(SQLiteParserListener); ok { + listenerT.EnterExpr_binary(s) + } +} + +func (s *Expr_binaryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(SQLiteParserListener); ok { + listenerT.ExitExpr_binary(s) + } +} + +type Expr_literalContext struct { + ExprContext +} + +func NewExpr_literalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_literalContext { + var p = new(Expr_literalContext) + + InitEmptyExprContext(&p.ExprContext) + p.parser = parser + p.CopyAll(ctx.(*ExprContext)) + + return p +} + +func (s *Expr_literalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Expr_literalContext) Literal_value() ILiteral_valueContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ILiteral_valueContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ILiteral_valueContext) +} + +func (s *Expr_literalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(SQLiteParserListener); ok { + listenerT.EnterExpr_literal(s) + } +} + +func (s *Expr_literalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(SQLiteParserListener); ok { + listenerT.ExitExpr_literal(s) + } +} + +type Expr_castContext struct { + ExprContext +} + +func NewExpr_castContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_castContext { + var p = new(Expr_castContext) + + InitEmptyExprContext(&p.ExprContext) + p.parser = parser + p.CopyAll(ctx.(*ExprContext)) + + return p } func (s *Expr_castContext) GetRuleContext() antlr.RuleContext { @@ -11731,15 +12935,15 @@ func (s *Expr_castContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_in_selectContext struct { - *ExprContext + ExprContext } func NewExpr_in_selectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_in_selectContext { var p = new(Expr_in_selectContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -11898,15 +13102,15 @@ func (s *Expr_in_selectContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_listContext struct { - *ExprContext + ExprContext } func NewExpr_listContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_listContext { var p = new(Expr_listContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -11985,15 +13189,15 @@ func (s *Expr_listContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_betweenContext struct { - *ExprContext + ExprContext } func NewExpr_betweenContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_betweenContext { var p = new(Expr_betweenContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -12068,15 +13272,15 @@ func (s *Expr_betweenContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_collateContext struct { - *ExprContext + ExprContext } func NewExpr_collateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_collateContext { var p = new(Expr_collateContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -12134,15 +13338,15 @@ func (s *Expr_collateContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_qualified_column_nameContext struct { - *ExprContext + ExprContext } func NewExpr_qualified_column_nameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_qualified_column_nameContext { var p = new(Expr_qualified_column_nameContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -12219,107 +13423,16 @@ func (s *Expr_qualified_column_nameContext) ExitRule(listener antlr.ParseTreeLis } } -type Expr_math_opContext struct { - *ExprContext -} - -func NewExpr_math_opContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_math_opContext { - var p = new(Expr_math_opContext) - - p.ExprContext = NewEmptyExprContext() - p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_math_opContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_math_opContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_math_opContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_math_opContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Expr_math_opContext) DIV() antlr.TerminalNode { - return s.GetToken(SQLiteParserDIV, 0) -} - -func (s *Expr_math_opContext) MOD() antlr.TerminalNode { - return s.GetToken(SQLiteParserMOD, 0) -} - -func (s *Expr_math_opContext) PLUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserPLUS, 0) -} - -func (s *Expr_math_opContext) MINUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserMINUS, 0) -} - -func (s *Expr_math_opContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_math_op(s) - } -} - -func (s *Expr_math_opContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_math_op(s) - } -} - type Expr_unaryContext struct { - *ExprContext + ExprContext } func NewExpr_unaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_unaryContext { var p = new(Expr_unaryContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -12373,15 +13486,15 @@ func (s *Expr_unaryContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_null_compContext struct { - *ExprContext + ExprContext } func NewExpr_null_compContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_null_compContext { var p = new(Expr_null_compContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -12435,15 +13548,15 @@ func (s *Expr_null_compContext) ExitRule(listener antlr.ParseTreeListener) { } type Expr_bindContext struct { - *ExprContext + ExprContext } func NewExpr_bindContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_bindContext { var p = new(Expr_bindContext) - p.ExprContext = NewEmptyExprContext() + InitEmptyExprContext(&p.ExprContext) p.parser = parser - p.CopyFrom(ctx.(*ExprContext)) + p.CopyAll(ctx.(*ExprContext)) return p } @@ -12477,10 +13590,8 @@ func (p *SQLiteParser) Expr() (localctx IExprContext) { } func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { - this := p - _ = this - var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + _parentState := p.GetState() localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState) var _prevctx IExprContext = localctx @@ -12489,28 +13600,16 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.EnterRecursionRule(localctx, 68, SQLiteParserRULE_expr, _p) var _la int - defer func() { - p.UnrollRecursionContexts(_parentctx) - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) p.SetState(1005) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 129, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 129, p.GetParserRuleContext()) { case 1: localctx = NewExpr_literalContext(p, localctx) p.SetParserRuleContext(localctx) @@ -12528,6 +13627,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(918) p.Match(SQLiteParserNUMBERED_BIND_PARAMETER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 3: @@ -12537,6 +13640,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(919) p.Match(SQLiteParserNAMED_BIND_PARAMETER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 4: @@ -12546,11 +13653,11 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.SetState(928) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 117, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 117, p.GetParserRuleContext()) == 1 { p.SetState(923) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 116, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 116, p.GetParserRuleContext()) == 1 { { p.SetState(920) p.Schema_name() @@ -12558,8 +13665,14 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(921) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(925) @@ -12568,8 +13681,14 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(926) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(930) @@ -12586,7 +13705,7 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } { p.SetState(932) - p.expr(20) + p.expr(21) } case 6: @@ -12600,21 +13719,33 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(935) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(948) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: p.SetState(937) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 118, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 118, p.GetParserRuleContext()) == 1 { { p.SetState(936) p.Match(SQLiteParserDISTINCT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { p.SetState(939) @@ -12622,12 +13753,19 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } p.SetState(944) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(940) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(941) @@ -12636,6 +13774,9 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.SetState(946) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } @@ -12643,6 +13784,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(947) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCLOSE_PAR: @@ -12652,26 +13797,34 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(950) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(952) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 121, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 121, p.GetParserRuleContext()) == 1 { { p.SetState(951) p.Filter_clause() } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(955) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 122, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 122, p.GetParserRuleContext()) == 1 { { p.SetState(954) p.Over_clause() } + } else if p.HasError() { // JIM + goto errorExit } case 7: @@ -12681,6 +13834,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(957) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(958) @@ -12688,12 +13845,19 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } p.SetState(963) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(959) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(960) @@ -12702,11 +13866,18 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.SetState(965) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { p.SetState(966) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 8: @@ -12716,10 +13887,18 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(968) p.Match(SQLiteParserCAST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(969) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(970) @@ -12728,6 +13907,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(971) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(972) @@ -12736,6 +13919,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(973) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 9: @@ -12744,29 +13931,47 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { _prevctx = localctx p.SetState(979) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserEXISTS_ || _la == SQLiteParserNOT_ { p.SetState(976) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { p.SetState(975) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(978) p.Match(SQLiteParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(981) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(982) @@ -12775,6 +13980,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(983) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 10: @@ -12784,25 +13993,38 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(985) p.Match(SQLiteParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(987) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 126, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 126, p.GetParserRuleContext()) == 1 { { p.SetState(986) p.expr(0) } + } else if p.HasError() { // JIM + goto errorExit } p.SetState(994) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for ok := true; ok; ok = _la == SQLiteParserWHEN_ { { p.SetState(989) p.Match(SQLiteParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(990) @@ -12811,6 +14033,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(991) p.Match(SQLiteParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(992) @@ -12819,16 +14045,26 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.SetState(996) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } p.SetState(1000) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserELSE_ { { p.SetState(998) p.Match(SQLiteParserELSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(999) @@ -12839,6 +14075,10 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { { p.SetState(1002) p.Match(SQLiteParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 11: @@ -12850,51 +14090,68 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.Raise_function() } + case antlr.ATNInvalidAltNumber: + goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(1123) + p.SetState(1126) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 145, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 145, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { if p.GetParseListeners() != nil { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(1121) + p.SetState(1124) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 144, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 144, p.GetParserRuleContext()) { case 1: localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1007) - if !(p.Precpred(p.GetParserRuleContext(), 19)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 20)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", "")) + goto errorExit } { p.SetState(1008) p.Match(SQLiteParserPIPE2) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(1009) - p.expr(20) + p.expr(21) } case 2: - localctx = NewExpr_math_opContext(p, NewExprContext(p, _parentctx, _parentState)) + localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1010) - if !(p.Precpred(p.GetParserRuleContext(), 18)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 19)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) + goto errorExit } { p.SetState(1011) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&12416) != 0) { + if !(_la == SQLiteParserPTR2 || _la == SQLiteParserPTR) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -12903,22 +14160,23 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } { p.SetState(1012) - p.expr(19) + p.expr(20) } case 3: - localctx = NewExpr_math_opContext(p, NewExprContext(p, _parentctx, _parentState)) + localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1013) - if !(p.Precpred(p.GetParserRuleContext(), 17)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 18)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) + goto errorExit } { p.SetState(1014) _la = p.GetTokenStream().LA(1) - if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&49280) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -12927,22 +14185,23 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } { p.SetState(1015) - p.expr(18) + p.expr(19) } case 4: - localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) + localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1016) - if !(p.Precpred(p.GetParserRuleContext(), 16)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 17)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) + goto errorExit } { p.SetState(1017) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&245760) != 0) { + if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -12951,7 +14210,7 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } { p.SetState(1018) - p.expr(17) + p.expr(18) } case 5: @@ -12959,14 +14218,15 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1019) - if !(p.Precpred(p.GetParserRuleContext(), 15)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 16)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", "")) + goto errorExit } { p.SetState(1020) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3932160) != 0) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&983040) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -12975,7 +14235,7 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } { p.SetState(1021) - p.expr(16) + p.expr(17) } case 6: @@ -12983,359 +14243,558 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1022) + if !(p.Precpred(p.GetParserRuleContext(), 15)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) + goto errorExit + } + { + p.SetState(1023) + _la = p.GetTokenStream().LA(1) + + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&15728640) != 0) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(1024) + p.expr(16) + } + + case 7: + localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) + p.SetState(1025) + if !(p.Precpred(p.GetParserRuleContext(), 14)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) + goto errorExit } - p.SetState(1038) + p.SetState(1041) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 131, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 131, p.GetParserRuleContext()) { case 1: { - p.SetState(1023) + p.SetState(1026) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 2: { - p.SetState(1024) + p.SetState(1027) p.Match(SQLiteParserEQ) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 3: { - p.SetState(1025) + p.SetState(1028) p.Match(SQLiteParserNOT_EQ1) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 4: { - p.SetState(1026) + p.SetState(1029) p.Match(SQLiteParserNOT_EQ2) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 5: { - p.SetState(1027) + p.SetState(1030) p.Match(SQLiteParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 6: { - p.SetState(1028) + p.SetState(1031) p.Match(SQLiteParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1029) + p.SetState(1032) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 7: - p.SetState(1031) + p.SetState(1034) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { - p.SetState(1030) + p.SetState(1033) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1033) + p.SetState(1036) p.Match(SQLiteParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 8: { - p.SetState(1034) + p.SetState(1037) p.Match(SQLiteParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 9: { - p.SetState(1035) + p.SetState(1038) p.Match(SQLiteParserGLOB_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 10: { - p.SetState(1036) + p.SetState(1039) p.Match(SQLiteParserMATCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 11: { - p.SetState(1037) + p.SetState(1040) p.Match(SQLiteParserREGEXP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1040) + p.SetState(1043) p.expr(15) } - case 7: - localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) + case 8: + localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1041) + p.SetState(1044) if !(p.Precpred(p.GetParserRuleContext(), 12)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) + goto errorExit } { - p.SetState(1042) + p.SetState(1045) p.Match(SQLiteParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1043) + p.SetState(1046) p.expr(13) } - case 8: - localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) + case 9: + localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1044) + p.SetState(1047) if !(p.Precpred(p.GetParserRuleContext(), 11)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) + goto errorExit } { - p.SetState(1045) + p.SetState(1048) p.Match(SQLiteParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1046) + p.SetState(1049) p.expr(12) } - case 9: + case 10: localctx = NewExpr_betweenContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1047) + p.SetState(1050) if !(p.Precpred(p.GetParserRuleContext(), 4)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) + goto errorExit } - p.SetState(1049) + p.SetState(1052) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { - p.SetState(1048) + p.SetState(1051) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1051) + p.SetState(1054) p.Match(SQLiteParserBETWEEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1052) + p.SetState(1055) p.expr(0) } { - p.SetState(1053) + p.SetState(1056) p.Match(SQLiteParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1054) + p.SetState(1057) p.expr(5) } - case 10: + case 11: localctx = NewExpr_in_selectContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1056) + p.SetState(1059) if !(p.Precpred(p.GetParserRuleContext(), 13)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) + goto errorExit } - p.SetState(1058) + p.SetState(1061) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { - p.SetState(1057) + p.SetState(1060) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1060) + p.SetState(1063) p.Match(SQLiteParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1099) + p.SetState(1102) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 140, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 140, p.GetParserRuleContext()) { case 1: { - p.SetState(1061) + p.SetState(1064) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1071) + p.SetState(1074) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 135, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) == 1 { { - p.SetState(1062) + p.SetState(1065) p.Select_stmt() } - } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 135, p.GetParserRuleContext()) == 2 { + } else if p.HasError() { // JIM + goto errorExit + } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) == 2 { { - p.SetState(1063) + p.SetState(1066) p.expr(0) } - p.SetState(1068) + p.SetState(1071) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1064) + p.SetState(1067) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1065) + p.SetState(1068) p.expr(0) } - p.SetState(1070) + p.SetState(1073) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1073) + p.SetState(1076) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 2: - p.SetState(1077) + p.SetState(1080) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 136, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 136, p.GetParserRuleContext()) == 1 { { - p.SetState(1074) + p.SetState(1077) p.Schema_name() } { - p.SetState(1075) + p.SetState(1078) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1079) + p.SetState(1082) p.Table_name() } case 3: - p.SetState(1083) + p.SetState(1086) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 { { - p.SetState(1080) + p.SetState(1083) p.Schema_name() } { - p.SetState(1081) + p.SetState(1084) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1085) + p.SetState(1088) p.Table_function_name() } { - p.SetState(1086) + p.SetState(1089) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1095) + p.SetState(1098) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-33552632) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-270215977642229761) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-16776415) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&-1) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&9088264048033660927) != 0) { { - p.SetState(1087) + p.SetState(1090) p.expr(0) } - p.SetState(1092) + p.SetState(1095) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1088) + p.SetState(1091) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1089) + p.SetState(1092) p.expr(0) } - p.SetState(1094) + p.SetState(1097) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } } { - p.SetState(1097) + p.SetState(1100) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } - case 11: + case 12: localctx = NewExpr_collateContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1101) + p.SetState(1104) if !(p.Precpred(p.GetParserRuleContext(), 7)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) + goto errorExit } { - p.SetState(1102) + p.SetState(1105) p.Match(SQLiteParserCOLLATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1103) + p.SetState(1106) p.Collation_name() } - case 12: + case 13: localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1104) + p.SetState(1107) if !(p.Precpred(p.GetParserRuleContext(), 6)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) + goto errorExit } - p.SetState(1106) + p.SetState(1109) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { - p.SetState(1105) + p.SetState(1108) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1108) + p.SetState(1111) _la = p.GetTokenStream().LA(1) - if !((int64((_la-77)) & ^0x3f) == 0 && ((int64(1)<<(_la-77))&2199028498433) != 0) { + if !((int64((_la-79)) & ^0x3f) == 0 && ((int64(1)<<(_la-79))&2199028498433) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -13343,71 +14802,116 @@ func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(1109) + p.SetState(1112) p.expr(0) } - p.SetState(1112) + p.SetState(1115) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 142, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 142, p.GetParserRuleContext()) == 1 { { - p.SetState(1110) + p.SetState(1113) p.Match(SQLiteParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1111) + p.SetState(1114) p.expr(0) } + } else if p.HasError() { // JIM + goto errorExit } - case 13: + case 14: localctx = NewExpr_null_compContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1114) + p.SetState(1117) if !(p.Precpred(p.GetParserRuleContext(), 5)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) + goto errorExit } - p.SetState(1119) + p.SetState(1122) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserISNULL_: { - p.SetState(1115) + p.SetState(1118) p.Match(SQLiteParserISNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserNOTNULL_: { - p.SetState(1116) + p.SetState(1119) p.Match(SQLiteParserNOTNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserNOT_: { - p.SetState(1117) + p.SetState(1120) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1118) + p.SetState(1121) p.Match(SQLiteParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } + case antlr.ATNInvalidAltNumber: + goto errorExit } } - p.SetState(1125) + p.SetState(1128) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 145, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 145, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IRaise_functionContext is an interface to support dynamic dispatch. @@ -13433,23 +14937,28 @@ type IRaise_functionContext interface { } type Raise_functionContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRaise_functionContext() *Raise_functionContext { var p = new(Raise_functionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_raise_function return p } +func InitEmptyRaise_functionContext(p *Raise_functionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_raise_function +} + func (*Raise_functionContext) IsRaise_functionContext() {} func NewRaise_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Raise_functionContext { var p = new(Raise_functionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_raise_function @@ -13528,51 +15037,47 @@ func (s *Raise_functionContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Raise_function() (localctx IRaise_functionContext) { - this := p - _ = this - localctx = NewRaise_functionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 70, SQLiteParserRULE_raise_function) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1126) + p.SetState(1129) p.Match(SQLiteParserRAISE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1127) + p.SetState(1130) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1132) + p.SetState(1135) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserIGNORE_: { - p.SetState(1128) + p.SetState(1131) p.Match(SQLiteParserIGNORE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserABORT_, SQLiteParserFAIL_, SQLiteParserROLLBACK_: { - p.SetState(1129) + p.SetState(1132) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserABORT_ || _la == SQLiteParserFAIL_ || _la == SQLiteParserROLLBACK_) { @@ -13583,23 +15088,42 @@ func (p *SQLiteParser) Raise_function() (localctx IRaise_functionContext) { } } { - p.SetState(1130) + p.SetState(1133) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1131) + p.SetState(1134) p.Error_message() } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } { - p.SetState(1134) + p.SetState(1137) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ILiteral_valueContext is an interface to support dynamic dispatch. @@ -13625,23 +15149,28 @@ type ILiteral_valueContext interface { } type Literal_valueContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyLiteral_valueContext() *Literal_valueContext { var p = new(Literal_valueContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_literal_value return p } +func InitEmptyLiteral_valueContext(p *Literal_valueContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_literal_value +} + func (*Literal_valueContext) IsLiteral_valueContext() {} func NewLiteral_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Literal_valueContext { var p = new(Literal_valueContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_literal_value @@ -13708,35 +15237,16 @@ func (s *Literal_valueContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Literal_value() (localctx ILiteral_valueContext) { - this := p - _ = this - localctx = NewLiteral_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 72, SQLiteParserRULE_literal_value) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1136) + p.SetState(1139) _la = p.GetTokenStream().LA(1) - if !(((int64((_la-52)) & ^0x3f) == 0 && ((int64(1)<<(_la-52))&4503599627370503) != 0) || ((int64((_la-173)) & ^0x3f) == 0 && ((int64(1)<<(_la-173))&409603) != 0)) { + if !(((int64((_la-54)) & ^0x3f) == 0 && ((int64(1)<<(_la-54))&4503599627370503) != 0) || ((int64((_la-175)) & ^0x3f) == 0 && ((int64(1)<<(_la-175))&409603) != 0)) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -13744,7 +15254,17 @@ func (p *SQLiteParser) Literal_value() (localctx ILiteral_valueContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IInsert_stmtContext is an interface to support dynamic dispatch. @@ -13779,34 +15299,39 @@ type IInsert_stmtContext interface { AllExpr() []IExprContext Expr(i int) IExprContext Select_stmt() ISelect_stmtContext + DEFAULT_() antlr.TerminalNode Upsert_clause() IUpsert_clauseContext Returning_clause() IReturning_clauseContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode - DEFAULT_() antlr.TerminalNode // IsInsert_stmtContext differentiates from other interfaces. IsInsert_stmtContext() } type Insert_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyInsert_stmtContext() *Insert_stmtContext { var p = new(Insert_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_insert_stmt return p } +func InitEmptyInsert_stmtContext(p *Insert_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_insert_stmt +} + func (*Insert_stmtContext) IsInsert_stmtContext() {} func NewInsert_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Insert_stmtContext { var p = new(Insert_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_insert_stmt @@ -14038,6 +15563,10 @@ func (s *Insert_stmtContext) Select_stmt() ISelect_stmtContext { return t.(ISelect_stmtContext) } +func (s *Insert_stmtContext) DEFAULT_() antlr.TerminalNode { + return s.GetToken(SQLiteParserDEFAULT_, 0) +} + func (s *Insert_stmtContext) Upsert_clause() IUpsert_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { @@ -14078,10 +15607,6 @@ func (s *Insert_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } -func (s *Insert_stmtContext) DEFAULT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFAULT_, 0) -} - func (s *Insert_stmtContext) GetRuleContext() antlr.RuleContext { return s } @@ -14103,287 +15628,401 @@ func (s *Insert_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Insert_stmt() (localctx IInsert_stmtContext) { - this := p - _ = this - localctx = NewInsert_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 74, SQLiteParserRULE_insert_stmt) var _la int - defer func() { - p.ExitRule() - }() + p.EnterOuterAlt(localctx, 1) + p.SetState(1142) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } + if _la == SQLiteParserWITH_ { + { + p.SetState(1141) + p.With_clause() } - }() - p.SetState(1211) + } + p.SetState(1149) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } - switch p.GetTokenStream().LA(1) { - case SQLiteParserINSERT_, SQLiteParserREPLACE_, SQLiteParserWITH_: - p.EnterOuterAlt(localctx, 1) - p.SetState(1139) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1138) - p.With_clause() + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 148, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1144) + p.Match(SQLiteParserINSERT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - } - p.SetState(1146) - p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 148, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1141) - p.Match(SQLiteParserINSERT_) - } - case 2: - { - p.SetState(1142) - p.Match(SQLiteParserREPLACE_) + case 2: + { + p.SetState(1145) + p.Match(SQLiteParserREPLACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } + } - case 3: - { - p.SetState(1143) - p.Match(SQLiteParserINSERT_) - } - { - p.SetState(1144) - p.Match(SQLiteParserOR_) + case 3: + { + p.SetState(1146) + p.Match(SQLiteParserINSERT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - { - p.SetState(1145) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } + } + { + p.SetState(1147) + p.Match(SQLiteParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - } { p.SetState(1148) - p.Match(SQLiteParserINTO_) - } - p.SetState(1152) - p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 149, p.GetParserRuleContext()) == 1 { - { - p.SetState(1149) - p.Schema_name() - } - { - p.SetState(1150) - p.Match(SQLiteParserDOT) + if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() } + } + case antlr.ATNInvalidAltNumber: + goto errorExit + } + { + p.SetState(1151) + p.Match(SQLiteParserINTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } + } + p.SetState(1155) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 149, p.GetParserRuleContext()) == 1 { { - p.SetState(1154) - p.Table_name() + p.SetState(1152) + p.Schema_name() } + { + p.SetState(1153) + p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { p.SetState(1157) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) + p.Table_name() + } + p.SetState(1160) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) - if _la == SQLiteParserAS_ { - { - p.SetState(1155) - p.Match(SQLiteParserAS_) - } - { - p.SetState(1156) - p.Table_alias() + if _la == SQLiteParserAS_ { + { + p.SetState(1158) + p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } + } + { + p.SetState(1159) + p.Table_alias() + } + + } + p.SetState(1173) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + if _la == SQLiteParserOPEN_PAR { + { + p.SetState(1162) + p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1163) + p.Column_name() } - p.SetState(1170) + p.SetState(1168) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if _la == SQLiteParserOPEN_PAR { + for _la == SQLiteParserCOMMA { { - p.SetState(1159) - p.Match(SQLiteParserOPEN_PAR) + p.SetState(1164) + p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1160) + p.SetState(1165) p.Column_name() } - p.SetState(1165) + + p.SetState(1170) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1171) + p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } - for _la == SQLiteParserCOMMA { - { - p.SetState(1161) - p.Match(SQLiteParserCOMMA) - } - { - p.SetState(1162) - p.Column_name() - } + } - p.SetState(1167) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) + p.SetState(1206) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 156, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1175) + p.Match(SQLiteParserVALUES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - { - p.SetState(1168) - p.Match(SQLiteParserCLOSE_PAR) + } + { + p.SetState(1176) + p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - } - - p.SetState(1201) + { + p.SetState(1177) + p.expr(0) + } + p.SetState(1182) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 156, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1172) - p.Match(SQLiteParserVALUES_) - } + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == SQLiteParserCOMMA { { - p.SetState(1173) - p.Match(SQLiteParserOPEN_PAR) + p.SetState(1178) + p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1174) + p.SetState(1179) p.expr(0) } - p.SetState(1179) + + p.SetState(1184) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1185) + p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1200) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) - for _la == SQLiteParserCOMMA { - { - p.SetState(1175) - p.Match(SQLiteParserCOMMA) - } - { - p.SetState(1176) - p.expr(0) + for _la == SQLiteParserCOMMA { + { + p.SetState(1186) + p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - - p.SetState(1181) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) } { - p.SetState(1182) - p.Match(SQLiteParserCLOSE_PAR) - } - p.SetState(1197) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1183) - p.Match(SQLiteParserCOMMA) - } - { - p.SetState(1184) - p.Match(SQLiteParserOPEN_PAR) - } - { - p.SetState(1185) - p.expr(0) + p.SetState(1187) + p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - p.SetState(1190) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1186) - p.Match(SQLiteParserCOMMA) - } - { - p.SetState(1187) - p.expr(0) - } + } + { + p.SetState(1188) + p.expr(0) + } + p.SetState(1193) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) - p.SetState(1192) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) + for _la == SQLiteParserCOMMA { + { + p.SetState(1189) + p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1193) - p.Match(SQLiteParserCLOSE_PAR) + p.SetState(1190) + p.expr(0) } - p.SetState(1199) + p.SetState(1195) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - - case 2: { - p.SetState(1200) - p.Select_stmt() + p.SetState(1196) + p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - } - p.SetState(1204) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserON_ { - { - p.SetState(1203) - p.Upsert_clause() + p.SetState(1202) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit } - + _la = p.GetTokenStream().LA(1) } - p.SetState(1207) - p.GetErrorHandler().Sync(p) - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserRETURNING_ { - { - p.SetState(1206) - p.Returning_clause() - } + case 2: + { + p.SetState(1203) + p.Select_stmt() } - case SQLiteParserDEFAULT_: - p.EnterOuterAlt(localctx, 2) + case 3: { - p.SetState(1209) + p.SetState(1204) p.Match(SQLiteParserDEFAULT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1210) + p.SetState(1205) p.Match(SQLiteParserVALUES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.SetState(1209) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == SQLiteParserON_ { + { + p.SetState(1208) + p.Upsert_clause() + } + + } + p.SetState(1212) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == SQLiteParserRETURNING_ { + { + p.SetState(1211) + p.Returning_clause() } - default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IUpsert_clauseContext is an interface to support dynamic dispatch. @@ -14422,23 +16061,28 @@ type IUpsert_clauseContext interface { } type Upsert_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUpsert_clauseContext() *Upsert_clauseContext { var p = new(Upsert_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_upsert_clause return p } +func InitEmptyUpsert_clauseContext(p *Upsert_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_upsert_clause +} + func (*Upsert_clauseContext) IsUpsert_clauseContext() {} func NewUpsert_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Upsert_clauseContext { var p = new(Upsert_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_upsert_clause @@ -14689,84 +16333,101 @@ func (s *Upsert_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Upsert_clause() (localctx IUpsert_clauseContext) { - this := p - _ = this - localctx = NewUpsert_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 76, SQLiteParserRULE_upsert_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1213) + p.SetState(1214) p.Match(SQLiteParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1214) + p.SetState(1215) p.Match(SQLiteParserCONFLICT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1229) + p.SetState(1230) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { - p.SetState(1215) + p.SetState(1216) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1216) + p.SetState(1217) p.Indexed_column() } - p.SetState(1221) + p.SetState(1222) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1217) + p.SetState(1218) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1218) + p.SetState(1219) p.Indexed_column() } - p.SetState(1223) + p.SetState(1224) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1224) + p.SetState(1225) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1227) + p.SetState(1228) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { - p.SetState(1225) + p.SetState(1226) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1226) + p.SetState(1227) p.expr(0) } @@ -14774,112 +16435,179 @@ func (p *SQLiteParser) Upsert_clause() (localctx IUpsert_clauseContext) { } { - p.SetState(1231) + p.SetState(1232) p.Match(SQLiteParserDO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1258) + p.SetState(1259) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserNOTHING_: { - p.SetState(1232) + p.SetState(1233) p.Match(SQLiteParserNOTHING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserUPDATE_: { - p.SetState(1233) + p.SetState(1234) p.Match(SQLiteParserUPDATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1234) + p.SetState(1235) p.Match(SQLiteParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1237) + p.SetState(1238) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 163, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) { case 1: { - p.SetState(1235) + p.SetState(1236) p.Column_name() } case 2: { - p.SetState(1236) + p.SetState(1237) p.Column_name_list() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1239) + p.SetState(1240) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1240) + p.SetState(1241) p.expr(0) } - p.SetState(1251) + p.SetState(1252) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1241) + p.SetState(1242) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1244) + p.SetState(1245) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 164, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 163, p.GetParserRuleContext()) { case 1: { - p.SetState(1242) + p.SetState(1243) p.Column_name() } case 2: { - p.SetState(1243) + p.SetState(1244) p.Column_name_list() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1246) + p.SetState(1247) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1247) + p.SetState(1248) p.expr(0) } - p.SetState(1253) + p.SetState(1254) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1256) + p.SetState(1257) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { - p.SetState(1254) + p.SetState(1255) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1255) + p.SetState(1256) p.expr(0) } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IPragma_stmtContext is an interface to support dynamic dispatch. @@ -14904,23 +16632,28 @@ type IPragma_stmtContext interface { } type Pragma_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPragma_stmtContext() *Pragma_stmtContext { var p = new(Pragma_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_pragma_stmt return p } +func InitEmptyPragma_stmtContext(p *Pragma_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_pragma_stmt +} + func (*Pragma_stmtContext) IsPragma_stmtContext() {} func NewPragma_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_stmtContext { var p = new(Pragma_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_pragma_stmt @@ -15019,85 +16752,99 @@ func (s *Pragma_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Pragma_stmt() (localctx IPragma_stmtContext) { - this := p - _ = this - localctx = NewPragma_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 78, SQLiteParserRULE_pragma_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1260) + p.SetState(1261) p.Match(SQLiteParserPRAGMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1264) + p.SetState(1265) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 168, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 167, p.GetParserRuleContext()) == 1 { { - p.SetState(1261) + p.SetState(1262) p.Schema_name() } { - p.SetState(1262) + p.SetState(1263) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1266) + p.SetState(1267) p.Pragma_name() } - p.SetState(1273) + p.SetState(1274) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserASSIGN: { - p.SetState(1267) + p.SetState(1268) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1268) + p.SetState(1269) p.Pragma_value() } case SQLiteParserOPEN_PAR: { - p.SetState(1269) + p.SetState(1270) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1270) + p.SetState(1271) p.Pragma_value() } { - p.SetState(1271) + p.SetState(1272) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWITH_: + case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWITH_: default: } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IPragma_valueContext is an interface to support dynamic dispatch. @@ -15117,23 +16864,28 @@ type IPragma_valueContext interface { } type Pragma_valueContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPragma_valueContext() *Pragma_valueContext { var p = new(Pragma_valueContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_pragma_value return p } +func InitEmptyPragma_valueContext(p *Pragma_valueContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_pragma_value +} + func (*Pragma_valueContext) IsPragma_valueContext() {} func NewPragma_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_valueContext { var p = new(Pragma_valueContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_pragma_value @@ -15200,55 +16952,55 @@ func (s *Pragma_valueContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Pragma_value() (localctx IPragma_valueContext) { - this := p - _ = this - localctx = NewPragma_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 80, SQLiteParserRULE_pragma_value) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1278) + p.SetState(1279) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 170, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 169, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(1275) + p.SetState(1276) p.Signed_number() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(1276) + p.SetState(1277) p.Name() } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(1277) + p.SetState(1278) p.Match(SQLiteParserSTRING_LITERAL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IReindex_stmtContext is an interface to support dynamic dispatch. @@ -15271,23 +17023,28 @@ type IReindex_stmtContext interface { } type Reindex_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyReindex_stmtContext() *Reindex_stmtContext { var p = new(Reindex_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_reindex_stmt return p } +func InitEmptyReindex_stmtContext(p *Reindex_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_reindex_stmt +} + func (*Reindex_stmtContext) IsReindex_stmtContext() {} func NewReindex_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Reindex_stmtContext { var p = new(Reindex_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_reindex_stmt @@ -15390,77 +17147,87 @@ func (s *Reindex_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Reindex_stmt() (localctx IReindex_stmtContext) { - this := p - _ = this - localctx = NewReindex_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 82, SQLiteParserRULE_reindex_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1280) + p.SetState(1281) p.Match(SQLiteParserREINDEX_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1291) + p.SetState(1292) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 173, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 1 { { - p.SetState(1281) + p.SetState(1282) p.Collation_name() } - } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 173, p.GetParserRuleContext()) == 2 { - p.SetState(1285) + } else if p.HasError() { // JIM + goto errorExit + } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 2 { + p.SetState(1286) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 171, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 170, p.GetParserRuleContext()) == 1 { { - p.SetState(1282) + p.SetState(1283) p.Schema_name() } { - p.SetState(1283) + p.SetState(1284) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } - p.SetState(1289) + p.SetState(1290) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 172, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 171, p.GetParserRuleContext()) { case 1: { - p.SetState(1287) + p.SetState(1288) p.Table_name() } case 2: { - p.SetState(1288) + p.SetState(1289) p.Index_name() } + case antlr.ATNInvalidAltNumber: + goto errorExit } + } else if p.HasError() { // JIM + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISelect_stmtContext is an interface to support dynamic dispatch. @@ -15484,23 +17251,28 @@ type ISelect_stmtContext interface { } type Select_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySelect_stmtContext() *Select_stmtContext { var p = new(Select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_select_stmt return p } +func InitEmptySelect_stmtContext(p *Select_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_select_stmt +} + func (*Select_stmtContext) IsSelect_stmtContext() {} func NewSelect_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_stmtContext { var p = new(Select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_select_stmt @@ -15661,91 +17433,102 @@ func (s *Select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Select_stmt() (localctx ISelect_stmtContext) { - this := p - _ = this - localctx = NewSelect_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 84, SQLiteParserRULE_select_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(1294) + p.SetState(1295) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { - p.SetState(1293) + p.SetState(1294) p.Common_table_stmt() } } { - p.SetState(1296) + p.SetState(1297) p.Select_core() } - p.SetState(1302) + p.SetState(1303) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 175, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 174, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(1297) + p.SetState(1298) p.Compound_operator() } { - p.SetState(1298) + p.SetState(1299) p.Select_core() } } - p.SetState(1304) + p.SetState(1305) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 175, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 174, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } - p.SetState(1306) + p.SetState(1307) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { - p.SetState(1305) + p.SetState(1306) p.Order_by_stmt() } } - p.SetState(1309) + p.SetState(1310) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ { { - p.SetState(1308) + p.SetState(1309) p.Limit_stmt() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IJoin_clauseContext is an interface to support dynamic dispatch. @@ -15768,23 +17551,28 @@ type IJoin_clauseContext interface { } type Join_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyJoin_clauseContext() *Join_clauseContext { var p = new(Join_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_join_clause return p } +func InitEmptyJoin_clauseContext(p *Join_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_join_clause +} + func (*Join_clauseContext) IsJoin_clauseContext() {} func NewJoin_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_clauseContext { var p = new(Join_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_join_clause @@ -15938,58 +17726,55 @@ func (s *Join_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Join_clause() (localctx IJoin_clauseContext) { - this := p - _ = this - localctx = NewJoin_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 86, SQLiteParserRULE_join_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1311) + p.SetState(1312) p.Table_or_subquery() } - p.SetState(1318) + p.SetState(1319) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - for _la == SQLiteParserCOMMA || _la == SQLiteParserCROSS_ || ((int64((_la-76)) & ^0x3f) == 0 && ((int64(1)<<(_la-76))&562949971511297) != 0) { + for _la == SQLiteParserCOMMA || _la == SQLiteParserCROSS_ || ((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949971511297) != 0) { { - p.SetState(1312) + p.SetState(1313) p.Join_operator() } { - p.SetState(1313) + p.SetState(1314) p.Table_or_subquery() } { - p.SetState(1314) + p.SetState(1315) p.Join_constraint() } - p.SetState(1320) + p.SetState(1321) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISelect_coreContext is an interface to support dynamic dispatch. @@ -16035,23 +17820,28 @@ type ISelect_coreContext interface { } type Select_coreContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySelect_coreContext() *Select_coreContext { var p = new(Select_coreContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_select_core return p } +func InitEmptySelect_coreContext(p *Select_coreContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_select_core +} + func (*Select_coreContext) IsSelect_coreContext() {} func NewSelect_coreContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_coreContext { var p = new(Select_coreContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_select_core @@ -16375,45 +18165,33 @@ func (s *Select_coreContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Select_core() (localctx ISelect_coreContext) { - this := p - _ = this - localctx = NewSelect_coreContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 88, SQLiteParserRULE_select_core) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1411) + p.SetState(1412) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserSELECT_: p.EnterOuterAlt(localctx, 1) { - p.SetState(1321) + p.SetState(1322) p.Match(SQLiteParserSELECT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1323) + p.SetState(1324) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 179, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 178, p.GetParserRuleContext()) == 1 { { - p.SetState(1322) + p.SetState(1323) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserALL_ || _la == SQLiteParserDISTINCT_) { @@ -16424,186 +18202,281 @@ func (p *SQLiteParser) Select_core() (localctx ISelect_coreContext) { } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1325) + p.SetState(1326) p.Result_column() } - p.SetState(1330) + p.SetState(1331) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1326) + p.SetState(1327) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1327) + p.SetState(1328) p.Result_column() } - p.SetState(1332) + p.SetState(1333) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1345) + p.SetState(1346) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFROM_ { { - p.SetState(1333) + p.SetState(1334) p.Match(SQLiteParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1343) + p.SetState(1344) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 182, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 181, p.GetParserRuleContext()) { case 1: { - p.SetState(1334) + p.SetState(1335) p.Table_or_subquery() } - p.SetState(1339) + p.SetState(1340) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1335) + p.SetState(1336) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1336) + p.SetState(1337) p.Table_or_subquery() } - p.SetState(1341) + p.SetState(1342) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } case 2: { - p.SetState(1342) + p.SetState(1343) p.Join_clause() } + case antlr.ATNInvalidAltNumber: + goto errorExit } } - p.SetState(1349) + p.SetState(1350) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { - p.SetState(1347) + p.SetState(1348) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1348) + p.SetState(1349) p.expr(0) } } - p.SetState(1365) + p.SetState(1366) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserGROUP_ { { - p.SetState(1351) + p.SetState(1352) p.Match(SQLiteParserGROUP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1352) + p.SetState(1353) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1353) + p.SetState(1354) p.expr(0) } - p.SetState(1358) + p.SetState(1359) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1354) + p.SetState(1355) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1355) + p.SetState(1356) p.expr(0) } - p.SetState(1360) + p.SetState(1361) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1363) + p.SetState(1364) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserHAVING_ { { - p.SetState(1361) + p.SetState(1362) p.Match(SQLiteParserHAVING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1362) + p.SetState(1363) p.expr(0) } } } - p.SetState(1381) + p.SetState(1382) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWINDOW_ { { - p.SetState(1367) + p.SetState(1368) p.Match(SQLiteParserWINDOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1368) + p.SetState(1369) p.Window_name() } { - p.SetState(1369) + p.SetState(1370) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1370) + p.SetState(1371) p.Window_defn() } - p.SetState(1378) + p.SetState(1379) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1371) + p.SetState(1372) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1372) + p.SetState(1373) p.Window_name() } { - p.SetState(1373) + p.SetState(1374) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1374) + p.SetState(1375) p.Window_defn() } - p.SetState(1380) + p.SetState(1381) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } @@ -16612,89 +18485,150 @@ func (p *SQLiteParser) Select_core() (localctx ISelect_coreContext) { case SQLiteParserVALUES_: p.EnterOuterAlt(localctx, 2) { - p.SetState(1383) + p.SetState(1384) p.Match(SQLiteParserVALUES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1384) + p.SetState(1385) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1385) + p.SetState(1386) p.expr(0) } - p.SetState(1390) + p.SetState(1391) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1386) + p.SetState(1387) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1387) + p.SetState(1388) p.expr(0) } - p.SetState(1392) + p.SetState(1393) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1393) + p.SetState(1394) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1408) + p.SetState(1409) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1394) + p.SetState(1395) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1395) + p.SetState(1396) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1396) + p.SetState(1397) p.expr(0) } - p.SetState(1401) + p.SetState(1402) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1397) + p.SetState(1398) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1398) + p.SetState(1399) p.expr(0) } - p.SetState(1403) + p.SetState(1404) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1404) + p.SetState(1405) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1410) + p.SetState(1411) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFactored_select_stmtContext is an interface to support dynamic dispatch. @@ -16712,23 +18646,28 @@ type IFactored_select_stmtContext interface { } type Factored_select_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFactored_select_stmtContext() *Factored_select_stmtContext { var p = new(Factored_select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_factored_select_stmt return p } +func InitEmptyFactored_select_stmtContext(p *Factored_select_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_factored_select_stmt +} + func (*Factored_select_stmtContext) IsFactored_select_stmtContext() {} func NewFactored_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Factored_select_stmtContext { var p = new(Factored_select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_factored_select_stmt @@ -16775,35 +18714,25 @@ func (s *Factored_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Factored_select_stmt() (localctx IFactored_select_stmtContext) { - this := p - _ = this - localctx = NewFactored_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 90, SQLiteParserRULE_factored_select_stmt) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1413) + p.SetState(1414) p.Select_stmt() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISimple_select_stmtContext is an interface to support dynamic dispatch. @@ -16824,23 +18753,28 @@ type ISimple_select_stmtContext interface { } type Simple_select_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySimple_select_stmtContext() *Simple_select_stmtContext { var p = new(Simple_select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_simple_select_stmt return p } +func InitEmptySimple_select_stmtContext(p *Simple_select_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_simple_select_stmt +} + func (*Simple_select_stmtContext) IsSimple_select_stmtContext() {} func NewSimple_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_select_stmtContext { var p = new(Simple_select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_simple_select_stmt @@ -16935,69 +18869,69 @@ func (s *Simple_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Simple_select_stmt() (localctx ISimple_select_stmtContext) { - this := p - _ = this - localctx = NewSimple_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 92, SQLiteParserRULE_simple_select_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(1416) + p.SetState(1417) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { - p.SetState(1415) + p.SetState(1416) p.Common_table_stmt() } } { - p.SetState(1418) + p.SetState(1419) p.Select_core() } - p.SetState(1420) + p.SetState(1421) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { - p.SetState(1419) + p.SetState(1420) p.Order_by_stmt() } } - p.SetState(1423) + p.SetState(1424) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ { { - p.SetState(1422) + p.SetState(1423) p.Limit_stmt() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICompound_select_stmtContext is an interface to support dynamic dispatch. @@ -17027,23 +18961,28 @@ type ICompound_select_stmtContext interface { } type Compound_select_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCompound_select_stmtContext() *Compound_select_stmtContext { var p = new(Compound_select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_compound_select_stmt return p } +func InitEmptyCompound_select_stmtContext(p *Compound_select_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_compound_select_stmt +} + func (*Compound_select_stmtContext) IsCompound_select_stmtContext() {} func NewCompound_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_select_stmtContext { var p = new(Compound_select_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_compound_select_stmt @@ -17195,119 +19134,148 @@ func (s *Compound_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Compound_select_stmt() (localctx ICompound_select_stmtContext) { - this := p - _ = this - localctx = NewCompound_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 94, SQLiteParserRULE_compound_select_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(1426) + p.SetState(1427) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { - p.SetState(1425) + p.SetState(1426) p.Common_table_stmt() } } { - p.SetState(1428) + p.SetState(1429) p.Select_core() } - p.SetState(1438) + p.SetState(1439) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for ok := true; ok; ok = _la == SQLiteParserEXCEPT_ || _la == SQLiteParserINTERSECT_ || _la == SQLiteParserUNION_ { - p.SetState(1435) + p.SetState(1436) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserUNION_: { - p.SetState(1429) + p.SetState(1430) p.Match(SQLiteParserUNION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1431) + p.SetState(1432) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserALL_ { { - p.SetState(1430) + p.SetState(1431) p.Match(SQLiteParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } case SQLiteParserINTERSECT_: { - p.SetState(1433) + p.SetState(1434) p.Match(SQLiteParserINTERSECT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserEXCEPT_: { - p.SetState(1434) + p.SetState(1435) p.Match(SQLiteParserEXCEPT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } { - p.SetState(1437) + p.SetState(1438) p.Select_core() } - p.SetState(1440) + p.SetState(1441) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1443) + p.SetState(1444) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { - p.SetState(1442) + p.SetState(1443) p.Order_by_stmt() } } - p.SetState(1446) + p.SetState(1447) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ { { - p.SetState(1445) + p.SetState(1446) p.Limit_stmt() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_or_subqueryContext is an interface to support dynamic dispatch. @@ -17345,23 +19313,28 @@ type ITable_or_subqueryContext interface { } type Table_or_subqueryContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_or_subqueryContext() *Table_or_subqueryContext { var p = new(Table_or_subqueryContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_or_subquery return p } +func InitEmptyTable_or_subqueryContext(p *Table_or_subqueryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_or_subquery +} + func (*Table_or_subqueryContext) IsTable_or_subqueryContext() {} func NewTable_or_subqueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_subqueryContext { var p = new(Table_or_subqueryContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_or_subquery @@ -17638,175 +19611,228 @@ func (s *Table_or_subqueryContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Table_or_subquery() (localctx ITable_or_subqueryContext) { - this := p - _ = this - localctx = NewTable_or_subqueryContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 96, SQLiteParserRULE_table_or_subquery) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1576) + p.SetState(1577) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 227, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 226, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) - p.SetState(1451) + p.SetState(1452) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 203, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 202, p.GetParserRuleContext()) == 1 { { - p.SetState(1448) + p.SetState(1449) p.Schema_name() } { - p.SetState(1449) + p.SetState(1450) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1453) + p.SetState(1454) p.Table_name() } - p.SetState(1458) + p.SetState(1459) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1455) + p.SetState(1456) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { - p.SetState(1454) + p.SetState(1455) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1457) + p.SetState(1458) p.Table_alias() } } - p.SetState(1465) + p.SetState(1466) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserINDEXED_: { - p.SetState(1460) + p.SetState(1461) p.Match(SQLiteParserINDEXED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1461) + p.SetState(1462) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1462) + p.SetState(1463) p.Index_name() } case SQLiteParserNOT_: { - p.SetState(1463) + p.SetState(1464) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1464) + p.SetState(1465) p.Match(SQLiteParserINDEXED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_: + case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_: default: } case 2: p.EnterOuterAlt(localctx, 2) - p.SetState(1470) + p.SetState(1471) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 207, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 206, p.GetParserRuleContext()) == 1 { { - p.SetState(1467) + p.SetState(1468) p.Schema_name() } { - p.SetState(1468) + p.SetState(1469) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1472) + p.SetState(1473) p.Table_function_name() } { - p.SetState(1473) + p.SetState(1474) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1474) + p.SetState(1475) p.expr(0) } - p.SetState(1479) + p.SetState(1480) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1475) + p.SetState(1476) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1476) + p.SetState(1477) p.expr(0) } - p.SetState(1481) + p.SetState(1482) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1482) + p.SetState(1483) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1487) + p.SetState(1488) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1484) + p.SetState(1485) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { - p.SetState(1483) + p.SetState(1484) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1486) + p.SetState(1487) p.Table_alias() } @@ -17815,80 +19841,122 @@ func (p *SQLiteParser) Table_or_subquery() (localctx ITable_or_subqueryContext) case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(1489) + p.SetState(1490) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1499) + p.SetState(1500) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 212, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 211, p.GetParserRuleContext()) { case 1: { - p.SetState(1490) + p.SetState(1491) p.Table_or_subquery() } - p.SetState(1495) + p.SetState(1496) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1491) + p.SetState(1492) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1492) + p.SetState(1493) p.Table_or_subquery() } - p.SetState(1497) + p.SetState(1498) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } case 2: { - p.SetState(1498) + p.SetState(1499) p.Join_clause() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1501) + p.SetState(1502) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 4: p.EnterOuterAlt(localctx, 4) { - p.SetState(1503) + p.SetState(1504) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1504) + p.SetState(1505) p.Select_stmt() } { - p.SetState(1505) + p.SetState(1506) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1510) + p.SetState(1511) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1507) + p.SetState(1508) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { - p.SetState(1506) + p.SetState(1507) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1509) + p.SetState(1510) p.Table_alias() } @@ -17896,231 +19964,347 @@ func (p *SQLiteParser) Table_or_subquery() (localctx ITable_or_subqueryContext) case 5: p.EnterOuterAlt(localctx, 5) - p.SetState(1515) + p.SetState(1516) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 215, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 214, p.GetParserRuleContext()) == 1 { { - p.SetState(1512) + p.SetState(1513) p.Schema_name() } { - p.SetState(1513) + p.SetState(1514) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1517) + p.SetState(1518) p.Table_name() } - p.SetState(1522) + p.SetState(1523) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 217, p.GetParserRuleContext()) == 1 { - p.SetState(1519) + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 216, p.GetParserRuleContext()) == 1 { + p.SetState(1520) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 216, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 215, p.GetParserRuleContext()) == 1 { { - p.SetState(1518) + p.SetState(1519) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1521) + p.SetState(1522) p.Table_alias_fallback() } + } else if p.HasError() { // JIM + goto errorExit } - p.SetState(1529) + p.SetState(1530) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserINDEXED_: { - p.SetState(1524) + p.SetState(1525) p.Match(SQLiteParserINDEXED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1525) + p.SetState(1526) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1526) + p.SetState(1527) p.Index_name() } case SQLiteParserNOT_: { - p.SetState(1527) + p.SetState(1528) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1528) + p.SetState(1529) p.Match(SQLiteParserINDEXED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_: + case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_: default: } case 6: p.EnterOuterAlt(localctx, 6) - p.SetState(1534) + p.SetState(1535) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 219, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 218, p.GetParserRuleContext()) == 1 { { - p.SetState(1531) + p.SetState(1532) p.Schema_name() } { - p.SetState(1532) + p.SetState(1533) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1536) + p.SetState(1537) p.Table_function_name() } { - p.SetState(1537) + p.SetState(1538) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1538) + p.SetState(1539) p.expr(0) } - p.SetState(1543) + p.SetState(1544) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1539) + p.SetState(1540) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1540) + p.SetState(1541) p.expr(0) } - p.SetState(1545) + p.SetState(1546) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1546) + p.SetState(1547) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1551) + p.SetState(1552) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 222, p.GetParserRuleContext()) == 1 { - p.SetState(1548) + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 221, p.GetParserRuleContext()) == 1 { + p.SetState(1549) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 221, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 220, p.GetParserRuleContext()) == 1 { { - p.SetState(1547) + p.SetState(1548) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1550) + p.SetState(1551) p.Table_alias_fallback() } + } else if p.HasError() { // JIM + goto errorExit } case 7: p.EnterOuterAlt(localctx, 7) { - p.SetState(1553) + p.SetState(1554) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1563) + p.SetState(1564) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 224, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 223, p.GetParserRuleContext()) { case 1: { - p.SetState(1554) + p.SetState(1555) p.Table_or_subquery() } - p.SetState(1559) + p.SetState(1560) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1555) + p.SetState(1556) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1556) + p.SetState(1557) p.Table_or_subquery() } - p.SetState(1561) + p.SetState(1562) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } case 2: { - p.SetState(1562) + p.SetState(1563) p.Join_clause() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1565) + p.SetState(1566) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 8: p.EnterOuterAlt(localctx, 8) { - p.SetState(1567) + p.SetState(1568) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1568) + p.SetState(1569) p.Select_stmt() } { - p.SetState(1569) + p.SetState(1570) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1574) + p.SetState(1575) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 226, p.GetParserRuleContext()) == 1 { - p.SetState(1571) + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 225, p.GetParserRuleContext()) == 1 { + p.SetState(1572) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 225, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 224, p.GetParserRuleContext()) == 1 { { - p.SetState(1570) + p.SetState(1571) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1573) + p.SetState(1574) p.Table_alias_fallback() } + } else if p.HasError() { // JIM + goto errorExit } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IResult_columnContext is an interface to support dynamic dispatch. @@ -18143,23 +20327,28 @@ type IResult_columnContext interface { } type Result_columnContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyResult_columnContext() *Result_columnContext { var p = new(Result_columnContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_result_column return p } +func InitEmptyResult_columnContext(p *Result_columnContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_result_column +} + func (*Result_columnContext) IsResult_columnContext() {} func NewResult_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Result_columnContext { var p = new(Result_columnContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_result_column @@ -18250,86 +20439,105 @@ func (s *Result_columnContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Result_column() (localctx IResult_columnContext) { - this := p - _ = this - localctx = NewResult_columnContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 98, SQLiteParserRULE_result_column) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1590) + p.SetState(1591) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 230, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 229, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(1578) + p.SetState(1579) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(1579) + p.SetState(1580) p.Table_name() } { - p.SetState(1580) + p.SetState(1581) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1581) + p.SetState(1582) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(1583) + p.SetState(1584) p.expr(0) } - p.SetState(1588) + p.SetState(1589) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1585) + p.SetState(1586) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { - p.SetState(1584) + p.SetState(1585) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { - p.SetState(1587) + p.SetState(1588) p.Column_alias() } } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IJoin_operatorContext is an interface to support dynamic dispatch. @@ -18355,23 +20563,28 @@ type IJoin_operatorContext interface { } type Join_operatorContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyJoin_operatorContext() *Join_operatorContext { var p = new(Join_operatorContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_join_operator return p } +func InitEmptyJoin_operatorContext(p *Join_operatorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_join_operator +} + func (*Join_operatorContext) IsJoin_operatorContext() {} func NewJoin_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_operatorContext { var p = new(Join_operatorContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_join_operator @@ -18438,85 +20651,93 @@ func (s *Join_operatorContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Join_operator() (localctx IJoin_operatorContext) { - this := p - _ = this - localctx = NewJoin_operatorContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 100, SQLiteParserRULE_join_operator) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1606) + p.SetState(1607) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserCOMMA: p.EnterOuterAlt(localctx, 1) { - p.SetState(1592) + p.SetState(1593) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserFULL_, SQLiteParserINNER_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserNATURAL_, SQLiteParserRIGHT_: p.EnterOuterAlt(localctx, 2) - p.SetState(1594) + p.SetState(1595) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNATURAL_ { { - p.SetState(1593) + p.SetState(1594) p.Match(SQLiteParserNATURAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } - p.SetState(1601) + p.SetState(1602) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserFULL_, SQLiteParserLEFT_, SQLiteParserRIGHT_: { - p.SetState(1596) + p.SetState(1597) _la = p.GetTokenStream().LA(1) - if !((int64((_la-76)) & ^0x3f) == 0 && ((int64(1)<<(_la-76))&562949954469889) != 0) { + if !((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949954469889) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } - p.SetState(1598) + p.SetState(1599) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOUTER_ { { - p.SetState(1597) + p.SetState(1598) p.Match(SQLiteParserOUTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } case SQLiteParserINNER_: { - p.SetState(1600) + p.SetState(1601) p.Match(SQLiteParserINNER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserJOIN_: @@ -18524,26 +20745,49 @@ func (p *SQLiteParser) Join_operator() (localctx IJoin_operatorContext) { default: } { - p.SetState(1603) + p.SetState(1604) p.Match(SQLiteParserJOIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCROSS_: p.EnterOuterAlt(localctx, 3) { - p.SetState(1604) + p.SetState(1605) p.Match(SQLiteParserCROSS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1605) + p.SetState(1606) p.Match(SQLiteParserJOIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IJoin_constraintContext is an interface to support dynamic dispatch. @@ -18569,23 +20813,28 @@ type IJoin_constraintContext interface { } type Join_constraintContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyJoin_constraintContext() *Join_constraintContext { var p = new(Join_constraintContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_join_constraint return p } +func InitEmptyJoin_constraintContext(p *Join_constraintContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_join_constraint +} + func (*Join_constraintContext) IsJoin_constraintContext() {} func NewJoin_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_constraintContext { var p = new(Join_constraintContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_join_constraint @@ -18697,82 +20946,103 @@ func (s *Join_constraintContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Join_constraint() (localctx IJoin_constraintContext) { - this := p - _ = this - localctx = NewJoin_constraintContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 102, SQLiteParserRULE_join_constraint) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(1622) + p.SetState(1623) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 236, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 235, p.GetParserRuleContext()) == 1 { { - p.SetState(1608) + p.SetState(1609) p.Match(SQLiteParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1609) + p.SetState(1610) p.expr(0) } - } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 236, p.GetParserRuleContext()) == 2 { + } else if p.HasError() { // JIM + goto errorExit + } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 235, p.GetParserRuleContext()) == 2 { { - p.SetState(1610) + p.SetState(1611) p.Match(SQLiteParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1611) + p.SetState(1612) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1612) + p.SetState(1613) p.Column_name() } - p.SetState(1617) + p.SetState(1618) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1613) + p.SetState(1614) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1614) + p.SetState(1615) p.Column_name() } - p.SetState(1619) + p.SetState(1620) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1620) + p.SetState(1621) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICompound_operatorContext is an interface to support dynamic dispatch. @@ -18793,23 +21063,28 @@ type ICompound_operatorContext interface { } type Compound_operatorContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCompound_operatorContext() *Compound_operatorContext { var p = new(Compound_operatorContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_compound_operator return p } +func InitEmptyCompound_operatorContext(p *Compound_operatorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_compound_operator +} + func (*Compound_operatorContext) IsCompound_operatorContext() {} func NewCompound_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_operatorContext { var p = new(Compound_operatorContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_compound_operator @@ -18856,47 +21131,42 @@ func (s *Compound_operatorContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Compound_operator() (localctx ICompound_operatorContext) { - this := p - _ = this - localctx = NewCompound_operatorContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 104, SQLiteParserRULE_compound_operator) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1630) + p.SetState(1631) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserUNION_: p.EnterOuterAlt(localctx, 1) { - p.SetState(1624) + p.SetState(1625) p.Match(SQLiteParserUNION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1626) + p.SetState(1627) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserALL_ { { - p.SetState(1625) + p.SetState(1626) p.Match(SQLiteParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -18904,22 +21174,41 @@ func (p *SQLiteParser) Compound_operator() (localctx ICompound_operatorContext) case SQLiteParserINTERSECT_: p.EnterOuterAlt(localctx, 2) { - p.SetState(1628) + p.SetState(1629) p.Match(SQLiteParserINTERSECT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserEXCEPT_: p.EnterOuterAlt(localctx, 3) { - p.SetState(1629) + p.SetState(1630) p.Match(SQLiteParserEXCEPT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IUpdate_stmtContext is an interface to support dynamic dispatch. @@ -18958,23 +21247,28 @@ type IUpdate_stmtContext interface { } type Update_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUpdate_stmtContext() *Update_stmtContext { var p = new(Update_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_update_stmt return p } +func InitEmptyUpdate_stmtContext(p *Update_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_update_stmt +} + func (*Update_stmtContext) IsUpdate_stmtContext() {} func NewUpdate_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmtContext { var p = new(Update_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_update_stmt @@ -19228,58 +21522,50 @@ func (s *Update_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Update_stmt() (localctx IUpdate_stmtContext) { - this := p - _ = this - localctx = NewUpdate_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 106, SQLiteParserRULE_update_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(1633) + p.SetState(1634) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { - p.SetState(1632) + p.SetState(1633) p.With_clause() } } { - p.SetState(1635) + p.SetState(1636) p.Match(SQLiteParserUPDATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1638) + p.SetState(1639) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 240, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 239, p.GetParserRuleContext()) == 1 { { - p.SetState(1636) + p.SetState(1637) p.Match(SQLiteParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1637) + p.SetState(1638) _la = p.GetTokenStream().LA(1) - if !(_la == SQLiteParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) { + if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -19287,105 +21573,161 @@ func (p *SQLiteParser) Update_stmt() (localctx IUpdate_stmtContext) { } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1640) + p.SetState(1641) p.Qualified_table_name() } { - p.SetState(1641) + p.SetState(1642) p.Match(SQLiteParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1644) + p.SetState(1645) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 241, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 240, p.GetParserRuleContext()) { case 1: { - p.SetState(1642) + p.SetState(1643) p.Column_name() } case 2: { - p.SetState(1643) + p.SetState(1644) p.Column_name_list() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1646) + p.SetState(1647) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1647) + p.SetState(1648) p.expr(0) } - p.SetState(1658) + p.SetState(1659) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1648) + p.SetState(1649) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1651) + p.SetState(1652) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 242, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 241, p.GetParserRuleContext()) { case 1: { - p.SetState(1649) + p.SetState(1650) p.Column_name() } case 2: { - p.SetState(1650) + p.SetState(1651) p.Column_name_list() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1653) + p.SetState(1654) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1654) + p.SetState(1655) p.expr(0) } - p.SetState(1660) + p.SetState(1661) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1663) + p.SetState(1664) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { - p.SetState(1661) + p.SetState(1662) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1662) + p.SetState(1663) p.expr(0) } } - p.SetState(1666) + p.SetState(1667) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserRETURNING_ { { - p.SetState(1665) + p.SetState(1666) p.Returning_clause() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IColumn_name_listContext is an interface to support dynamic dispatch. @@ -19408,23 +21750,28 @@ type IColumn_name_listContext interface { } type Column_name_listContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_name_listContext() *Column_name_listContext { var p = new(Column_name_listContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_column_name_list return p } +func InitEmptyColumn_name_listContext(p *Column_name_listContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_column_name_list +} + func (*Column_name_listContext) IsColumn_name_listContext() {} func NewColumn_name_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_name_listContext { var p = new(Column_name_listContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_name_list @@ -19512,62 +21859,71 @@ func (s *Column_name_listContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Column_name_list() (localctx IColumn_name_listContext) { - this := p - _ = this - localctx = NewColumn_name_listContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 108, SQLiteParserRULE_column_name_list) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1668) + p.SetState(1669) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1669) + p.SetState(1670) p.Column_name() } - p.SetState(1674) + p.SetState(1675) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1670) + p.SetState(1671) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1671) + p.SetState(1672) p.Column_name() } - p.SetState(1676) + p.SetState(1677) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { - p.SetState(1677) + p.SetState(1678) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IUpdate_stmt_limitedContext is an interface to support dynamic dispatch. @@ -19607,23 +21963,28 @@ type IUpdate_stmt_limitedContext interface { } type Update_stmt_limitedContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUpdate_stmt_limitedContext() *Update_stmt_limitedContext { var p = new(Update_stmt_limitedContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_update_stmt_limited return p } +func InitEmptyUpdate_stmt_limitedContext(p *Update_stmt_limitedContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_update_stmt_limited +} + func (*Update_stmt_limitedContext) IsUpdate_stmt_limitedContext() {} func NewUpdate_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmt_limitedContext { var p = new(Update_stmt_limitedContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_update_stmt_limited @@ -19893,58 +22254,50 @@ func (s *Update_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Update_stmt_limited() (localctx IUpdate_stmt_limitedContext) { - this := p - _ = this - localctx = NewUpdate_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 110, SQLiteParserRULE_update_stmt_limited) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(1680) + p.SetState(1681) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { - p.SetState(1679) + p.SetState(1680) p.With_clause() } } { - p.SetState(1682) + p.SetState(1683) p.Match(SQLiteParserUPDATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1685) + p.SetState(1686) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 248, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 247, p.GetParserRuleContext()) == 1 { { - p.SetState(1683) + p.SetState(1684) p.Match(SQLiteParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1684) + p.SetState(1685) _la = p.GetTokenStream().LA(1) - if !(_la == SQLiteParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) { + if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -19952,116 +22305,175 @@ func (p *SQLiteParser) Update_stmt_limited() (localctx IUpdate_stmt_limitedConte } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1687) + p.SetState(1688) p.Qualified_table_name() } { - p.SetState(1688) + p.SetState(1689) p.Match(SQLiteParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1691) + p.SetState(1692) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 249, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 248, p.GetParserRuleContext()) { case 1: { - p.SetState(1689) + p.SetState(1690) p.Column_name() } case 2: { - p.SetState(1690) + p.SetState(1691) p.Column_name_list() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1693) + p.SetState(1694) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1694) + p.SetState(1695) p.expr(0) } - p.SetState(1705) + p.SetState(1706) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1695) + p.SetState(1696) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1698) + p.SetState(1699) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 250, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 249, p.GetParserRuleContext()) { case 1: { - p.SetState(1696) + p.SetState(1697) p.Column_name() } case 2: { - p.SetState(1697) + p.SetState(1698) p.Column_name_list() } + case antlr.ATNInvalidAltNumber: + goto errorExit } { - p.SetState(1700) + p.SetState(1701) p.Match(SQLiteParserASSIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1701) + p.SetState(1702) p.expr(0) } - p.SetState(1707) + p.SetState(1708) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1710) + p.SetState(1711) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { - p.SetState(1708) + p.SetState(1709) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1709) + p.SetState(1710) p.expr(0) } } - p.SetState(1716) + p.SetState(1717) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ { - p.SetState(1713) + p.SetState(1714) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { - p.SetState(1712) + p.SetState(1713) p.Order_by_stmt() } } { - p.SetState(1715) + p.SetState(1716) p.Limit_stmt() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IQualified_table_nameContext is an interface to support dynamic dispatch. @@ -20087,23 +22499,28 @@ type IQualified_table_nameContext interface { } type Qualified_table_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyQualified_table_nameContext() *Qualified_table_nameContext { var p = new(Qualified_table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_qualified_table_name return p } +func InitEmptyQualified_table_nameContext(p *Qualified_table_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_qualified_table_name +} + func (*Qualified_table_nameContext) IsQualified_table_nameContext() {} func NewQualified_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_table_nameContext { var p = new(Qualified_table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_qualified_table_name @@ -20218,97 +22635,119 @@ func (s *Qualified_table_nameContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Qualified_table_name() (localctx IQualified_table_nameContext) { - this := p - _ = this - localctx = NewQualified_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 112, SQLiteParserRULE_qualified_table_name) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(1721) + p.SetState(1722) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 255, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 254, p.GetParserRuleContext()) == 1 { { - p.SetState(1718) + p.SetState(1719) p.Schema_name() } { - p.SetState(1719) + p.SetState(1720) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1723) + p.SetState(1724) p.Table_name() } - p.SetState(1726) + p.SetState(1727) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { - p.SetState(1724) + p.SetState(1725) p.Match(SQLiteParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1725) + p.SetState(1726) p.Alias() } } - p.SetState(1733) + p.SetState(1734) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserINDEXED_: { - p.SetState(1728) + p.SetState(1729) p.Match(SQLiteParserINDEXED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1729) + p.SetState(1730) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1730) + p.SetState(1731) p.Index_name() } case SQLiteParserNOT_: { - p.SetState(1731) + p.SetState(1732) p.Match(SQLiteParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1732) + p.SetState(1733) p.Match(SQLiteParserINDEXED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserLIMIT_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_: + case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserLIMIT_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_: default: } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IVacuum_stmtContext is an interface to support dynamic dispatch. @@ -20329,23 +22768,28 @@ type IVacuum_stmtContext interface { } type Vacuum_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyVacuum_stmtContext() *Vacuum_stmtContext { var p = new(Vacuum_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_vacuum_stmt return p } +func InitEmptyVacuum_stmtContext(p *Vacuum_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_vacuum_stmt +} + func (*Vacuum_stmtContext) IsVacuum_stmtContext() {} func NewVacuum_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Vacuum_stmtContext { var p = new(Vacuum_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_vacuum_stmt @@ -20416,61 +22860,65 @@ func (s *Vacuum_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Vacuum_stmt() (localctx IVacuum_stmtContext) { - this := p - _ = this - localctx = NewVacuum_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 114, SQLiteParserRULE_vacuum_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1735) + p.SetState(1736) p.Match(SQLiteParserVACUUM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1737) + p.SetState(1738) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 258, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 257, p.GetParserRuleContext()) == 1 { { - p.SetState(1736) + p.SetState(1737) p.Schema_name() } + } else if p.HasError() { // JIM + goto errorExit } - p.SetState(1741) + p.SetState(1742) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserINTO_ { { - p.SetState(1739) + p.SetState(1740) p.Match(SQLiteParserINTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1740) + p.SetState(1741) p.Filename() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFilter_clauseContext is an interface to support dynamic dispatch. @@ -20492,23 +22940,28 @@ type IFilter_clauseContext interface { } type Filter_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFilter_clauseContext() *Filter_clauseContext { var p = new(Filter_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_filter_clause return p } +func InitEmptyFilter_clauseContext(p *Filter_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_filter_clause +} + func (*Filter_clauseContext) IsFilter_clauseContext() {} func NewFilter_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Filter_clauseContext { var p = new(Filter_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_filter_clause @@ -20571,51 +23024,57 @@ func (s *Filter_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Filter_clause() (localctx IFilter_clauseContext) { - this := p - _ = this - localctx = NewFilter_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 116, SQLiteParserRULE_filter_clause) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1743) + p.SetState(1744) p.Match(SQLiteParserFILTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1744) + p.SetState(1745) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1745) + p.SetState(1746) p.Match(SQLiteParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1746) + p.SetState(1747) p.expr(0) } { - p.SetState(1747) + p.SetState(1748) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IWindow_defnContext is an interface to support dynamic dispatch. @@ -20646,23 +23105,28 @@ type IWindow_defnContext interface { } type Window_defnContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_defnContext() *Window_defnContext { var p = new(Window_defnContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_window_defn return p } +func InitEmptyWindow_defnContext(p *Window_defnContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_window_defn +} + func (*Window_defnContext) IsWindow_defnContext() {} func NewWindow_defnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_defnContext { var p = new(Window_defnContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_defn @@ -20839,130 +23303,173 @@ func (s *Window_defnContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Window_defn() (localctx IWindow_defnContext) { - this := p - _ = this - localctx = NewWindow_defnContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 118, SQLiteParserRULE_window_defn) - var _la int - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() + p.EnterRule(localctx, 118, SQLiteParserRULE_window_defn) + var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(1749) + p.SetState(1750) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1751) + p.SetState(1752) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 260, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 259, p.GetParserRuleContext()) == 1 { { - p.SetState(1750) + p.SetState(1751) p.Base_window_name() } + } else if p.HasError() { // JIM + goto errorExit } - p.SetState(1763) + p.SetState(1764) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(1753) + p.SetState(1754) p.Match(SQLiteParserPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1754) + p.SetState(1755) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1755) + p.SetState(1756) p.expr(0) } - p.SetState(1760) + p.SetState(1761) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1756) + p.SetState(1757) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1757) + p.SetState(1758) p.expr(0) } - p.SetState(1762) + p.SetState(1763) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } } { - p.SetState(1765) + p.SetState(1766) p.Match(SQLiteParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1766) + p.SetState(1767) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1767) + p.SetState(1768) p.Ordering_term() } - p.SetState(1772) + p.SetState(1773) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1768) + p.SetState(1769) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1769) + p.SetState(1770) p.Ordering_term() } - p.SetState(1774) + p.SetState(1775) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } - p.SetState(1776) + p.SetState(1777) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4503599761588225) != 0 { + if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { - p.SetState(1775) + p.SetState(1776) p.Frame_spec() } } { - p.SetState(1778) + p.SetState(1779) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IOver_clauseContext is an interface to support dynamic dispatch. @@ -20995,23 +23502,28 @@ type IOver_clauseContext interface { } type Over_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOver_clauseContext() *Over_clauseContext { var p = new(Over_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_over_clause return p } +func InitEmptyOver_clauseContext(p *Over_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_over_clause +} + func (*Over_clauseContext) IsOver_clauseContext() {} func NewOver_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Over_clauseContext { var p = new(Over_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_over_clause @@ -21208,151 +23720,207 @@ func (s *Over_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Over_clause() (localctx IOver_clauseContext) { - this := p - _ = this - localctx = NewOver_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 120, SQLiteParserRULE_over_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1780) + p.SetState(1781) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1814) + p.SetState(1815) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 271, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 270, p.GetParserRuleContext()) { case 1: { - p.SetState(1781) + p.SetState(1782) p.Window_name() } case 2: { - p.SetState(1782) + p.SetState(1783) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1784) + p.SetState(1785) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 265, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 264, p.GetParserRuleContext()) == 1 { { - p.SetState(1783) + p.SetState(1784) p.Base_window_name() } + } else if p.HasError() { // JIM + goto errorExit } - p.SetState(1796) + p.SetState(1797) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(1786) + p.SetState(1787) p.Match(SQLiteParserPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1787) + p.SetState(1788) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1788) + p.SetState(1789) p.expr(0) } - p.SetState(1793) + p.SetState(1794) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1789) + p.SetState(1790) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1790) + p.SetState(1791) p.expr(0) } - p.SetState(1795) + p.SetState(1796) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } } - p.SetState(1808) + p.SetState(1809) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { - p.SetState(1798) + p.SetState(1799) p.Match(SQLiteParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1799) + p.SetState(1800) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1800) + p.SetState(1801) p.Ordering_term() } - p.SetState(1805) + p.SetState(1806) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1801) + p.SetState(1802) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1802) + p.SetState(1803) p.Ordering_term() } - p.SetState(1807) + p.SetState(1808) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } } - p.SetState(1811) + p.SetState(1812) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4503599761588225) != 0 { + if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { - p.SetState(1810) + p.SetState(1811) p.Frame_spec() } } { - p.SetState(1813) + p.SetState(1814) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFrame_specContext is an interface to support dynamic dispatch. @@ -21377,23 +23945,28 @@ type IFrame_specContext interface { } type Frame_specContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_specContext() *Frame_specContext { var p = new(Frame_specContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_frame_spec return p } +func InitEmptyFrame_specContext(p *Frame_specContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_frame_spec +} + func (*Frame_specContext) IsFrame_specContext() {} func NewFrame_specContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_specContext { var p = new(Frame_specContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_spec @@ -21468,72 +24041,82 @@ func (s *Frame_specContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Frame_spec() (localctx IFrame_specContext) { - this := p - _ = this - localctx = NewFrame_specContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 122, SQLiteParserRULE_frame_spec) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1816) + p.SetState(1817) p.Frame_clause() } - p.SetState(1824) + p.SetState(1825) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserEXCLUDE_: { - p.SetState(1817) + p.SetState(1818) p.Match(SQLiteParserEXCLUDE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1818) + p.SetState(1819) p.Match(SQLiteParserNO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1819) + p.SetState(1820) p.Match(SQLiteParserOTHERS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCURRENT_: { - p.SetState(1820) + p.SetState(1821) p.Match(SQLiteParserCURRENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1821) + p.SetState(1822) p.Match(SQLiteParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserGROUP_: { - p.SetState(1822) + p.SetState(1823) p.Match(SQLiteParserGROUP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserTIES_: { - p.SetState(1823) + p.SetState(1824) p.Match(SQLiteParserTIES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCLOSE_PAR: @@ -21541,7 +24124,17 @@ func (p *SQLiteParser) Frame_spec() (localctx IFrame_specContext) { default: } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFrame_clauseContext is an interface to support dynamic dispatch. @@ -21566,23 +24159,28 @@ type IFrame_clauseContext interface { } type Frame_clauseContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_clauseContext() *Frame_clauseContext { var p = new(Frame_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_frame_clause return p } +func InitEmptyFrame_clauseContext(p *Frame_clauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_frame_clause +} + func (*Frame_clauseContext) IsFrame_clauseContext() {} func NewFrame_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_clauseContext { var p = new(Frame_clauseContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_clause @@ -21681,71 +24279,76 @@ func (s *Frame_clauseContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Frame_clause() (localctx IFrame_clauseContext) { - this := p - _ = this - localctx = NewFrame_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 124, SQLiteParserRULE_frame_clause) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1826) + p.SetState(1827) _la = p.GetTokenStream().LA(1) - if !((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4503599761588225) != 0) { + if !((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } - p.SetState(1833) + p.SetState(1834) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 273, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 272, p.GetParserRuleContext()) { case 1: { - p.SetState(1827) + p.SetState(1828) p.Frame_single() } case 2: { - p.SetState(1828) + p.SetState(1829) p.Match(SQLiteParserBETWEEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1829) + p.SetState(1830) p.Frame_left() } { - p.SetState(1830) + p.SetState(1831) p.Match(SQLiteParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1831) + p.SetState(1832) p.Frame_right() } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISimple_function_invocationContext is an interface to support dynamic dispatch. @@ -21770,23 +24373,28 @@ type ISimple_function_invocationContext interface { } type Simple_function_invocationContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySimple_function_invocationContext() *Simple_function_invocationContext { var p = new(Simple_function_invocationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_simple_function_invocation return p } +func InitEmptySimple_function_invocationContext(p *Simple_function_invocationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_simple_function_invocation +} + func (*Simple_function_invocationContext) IsSimple_function_invocationContext() {} func NewSimple_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_function_invocationContext { var p = new(Simple_function_invocationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_simple_function_invocation @@ -21894,81 +24502,98 @@ func (s *Simple_function_invocationContext) ExitRule(listener antlr.ParseTreeLis } func (p *SQLiteParser) Simple_function_invocation() (localctx ISimple_function_invocationContext) { - this := p - _ = this - localctx = NewSimple_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 126, SQLiteParserRULE_simple_function_invocation) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1835) + p.SetState(1836) p.Simple_func() } { - p.SetState(1836) + p.SetState(1837) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1846) + p.SetState(1847) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: { - p.SetState(1837) + p.SetState(1838) p.expr(0) } - p.SetState(1842) + p.SetState(1843) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1838) + p.SetState(1839) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1839) + p.SetState(1840) p.expr(0) } - p.SetState(1844) + p.SetState(1845) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { - p.SetState(1845) + p.SetState(1846) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } { - p.SetState(1848) + p.SetState(1849) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAggregate_function_invocationContext is an interface to support dynamic dispatch. @@ -21995,23 +24620,28 @@ type IAggregate_function_invocationContext interface { } type Aggregate_function_invocationContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAggregate_function_invocationContext() *Aggregate_function_invocationContext { var p = new(Aggregate_function_invocationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation return p } +func InitEmptyAggregate_function_invocationContext(p *Aggregate_function_invocationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation +} + func (*Aggregate_function_invocationContext) IsAggregate_function_invocationContext() {} func NewAggregate_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_function_invocationContext { var p = new(Aggregate_function_invocationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation @@ -22139,80 +24769,87 @@ func (s *Aggregate_function_invocationContext) ExitRule(listener antlr.ParseTree } func (p *SQLiteParser) Aggregate_function_invocation() (localctx IAggregate_function_invocationContext) { - this := p - _ = this - localctx = NewAggregate_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 128, SQLiteParserRULE_aggregate_function_invocation) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1850) + p.SetState(1851) p.Aggregate_func() } { - p.SetState(1851) + p.SetState(1852) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1864) + p.SetState(1865) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - p.SetState(1853) + p.SetState(1854) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 276, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 275, p.GetParserRuleContext()) == 1 { { - p.SetState(1852) + p.SetState(1853) p.Match(SQLiteParserDISTINCT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1855) + p.SetState(1856) p.expr(0) } - p.SetState(1860) + p.SetState(1861) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1856) + p.SetState(1857) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1857) + p.SetState(1858) p.expr(0) } - p.SetState(1862) + p.SetState(1863) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { - p.SetState(1863) + p.SetState(1864) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCLOSE_PAR: @@ -22220,22 +24857,39 @@ func (p *SQLiteParser) Aggregate_function_invocation() (localctx IAggregate_func default: } { - p.SetState(1866) + p.SetState(1867) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1868) + p.SetState(1869) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFILTER_ { { - p.SetState(1867) + p.SetState(1868) p.Filter_clause() } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IWindow_function_invocationContext is an interface to support dynamic dispatch. @@ -22264,23 +24918,28 @@ type IWindow_function_invocationContext interface { } type Window_function_invocationContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_function_invocationContext() *Window_function_invocationContext { var p = new(Window_function_invocationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_window_function_invocation return p } +func InitEmptyWindow_function_invocationContext(p *Window_function_invocationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_window_function_invocation +} + func (*Window_function_invocationContext) IsWindow_function_invocationContext() {} func NewWindow_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_function_invocationContext { var p = new(Window_function_invocationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_function_invocation @@ -22440,70 +25099,71 @@ func (s *Window_function_invocationContext) ExitRule(listener antlr.ParseTreeLis } func (p *SQLiteParser) Window_function_invocation() (localctx IWindow_function_invocationContext) { - this := p - _ = this - localctx = NewWindow_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 130, SQLiteParserRULE_window_function_invocation) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1870) + p.SetState(1871) p.Window_function() } { - p.SetState(1871) + p.SetState(1872) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1881) + p.SetState(1882) p.GetErrorHandler().Sync(p) - + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: { - p.SetState(1872) + p.SetState(1873) p.expr(0) } - p.SetState(1877) + p.SetState(1878) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1873) + p.SetState(1874) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1874) + p.SetState(1875) p.expr(0) } - p.SetState(1879) + p.SetState(1880) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { - p.SetState(1880) + p.SetState(1881) p.Match(SQLiteParserSTAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCLOSE_PAR: @@ -22511,42 +25171,69 @@ func (p *SQLiteParser) Window_function_invocation() (localctx IWindow_function_i default: } { - p.SetState(1883) + p.SetState(1884) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1885) + p.SetState(1886) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFILTER_ { { - p.SetState(1884) + p.SetState(1885) p.Filter_clause() } } { - p.SetState(1887) + p.SetState(1888) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1890) + p.SetState(1891) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 283, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 282, p.GetParserRuleContext()) { case 1: { - p.SetState(1888) + p.SetState(1889) p.Window_defn() } case 2: { - p.SetState(1889) + p.SetState(1890) p.Window_name() } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICommon_table_stmtContext is an interface to support dynamic dispatch. @@ -22569,23 +25256,28 @@ type ICommon_table_stmtContext interface { } type Common_table_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCommon_table_stmtContext() *Common_table_stmtContext { var p = new(Common_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_common_table_stmt return p } +func InitEmptyCommon_table_stmtContext(p *Common_table_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_common_table_stmt +} + func (*Common_table_stmtContext) IsCommon_table_stmtContext() {} func NewCommon_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_stmtContext { var p = new(Common_table_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_common_table_stmt @@ -22673,68 +25365,79 @@ func (s *Common_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Common_table_stmt() (localctx ICommon_table_stmtContext) { - this := p - _ = this - localctx = NewCommon_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 132, SQLiteParserRULE_common_table_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1892) + p.SetState(1893) p.Match(SQLiteParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1894) + p.SetState(1895) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 284, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 283, p.GetParserRuleContext()) == 1 { { - p.SetState(1893) + p.SetState(1894) p.Match(SQLiteParserRECURSIVE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(1896) + p.SetState(1897) p.Common_table_expression() } - p.SetState(1901) + p.SetState(1902) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1897) + p.SetState(1898) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1898) + p.SetState(1899) p.Common_table_expression() } - p.SetState(1903) + p.SetState(1904) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IOrder_by_stmtContext is an interface to support dynamic dispatch. @@ -22757,23 +25460,28 @@ type IOrder_by_stmtContext interface { } type Order_by_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrder_by_stmtContext() *Order_by_stmtContext { var p = new(Order_by_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_order_by_stmt return p } +func InitEmptyOrder_by_stmtContext(p *Order_by_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_order_by_stmt +} + func (*Order_by_stmtContext) IsOrder_by_stmtContext() {} func NewOrder_by_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_stmtContext { var p = new(Order_by_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_order_by_stmt @@ -22861,62 +25569,71 @@ func (s *Order_by_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Order_by_stmt() (localctx IOrder_by_stmtContext) { - this := p - _ = this - localctx = NewOrder_by_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 134, SQLiteParserRULE_order_by_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1904) + p.SetState(1905) p.Match(SQLiteParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1905) + p.SetState(1906) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1906) + p.SetState(1907) p.Ordering_term() } - p.SetState(1911) + p.SetState(1912) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(1907) + p.SetState(1908) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1908) + p.SetState(1909) p.Ordering_term() } - p.SetState(1913) + p.SetState(1914) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ILimit_stmtContext is an interface to support dynamic dispatch. @@ -22938,23 +25655,28 @@ type ILimit_stmtContext interface { } type Limit_stmtContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyLimit_stmtContext() *Limit_stmtContext { var p = new(Limit_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_limit_stmt return p } +func InitEmptyLimit_stmtContext(p *Limit_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_limit_stmt +} + func (*Limit_stmtContext) IsLimit_stmtContext() {} func NewLimit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Limit_stmtContext { var p = new(Limit_stmtContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_limit_stmt @@ -23038,45 +25760,33 @@ func (s *Limit_stmtContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Limit_stmt() (localctx ILimit_stmtContext) { - this := p - _ = this - localctx = NewLimit_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 136, SQLiteParserRULE_limit_stmt) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1914) + p.SetState(1915) p.Match(SQLiteParserLIMIT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1915) + p.SetState(1916) p.expr(0) } - p.SetState(1918) + p.SetState(1919) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_ { { - p.SetState(1916) + p.SetState(1917) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_) { @@ -23087,13 +25797,23 @@ func (p *SQLiteParser) Limit_stmt() (localctx ILimit_stmtContext) { } } { - p.SetState(1917) + p.SetState(1918) p.expr(0) } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IOrdering_termContext is an interface to support dynamic dispatch. @@ -23117,23 +25837,28 @@ type IOrdering_termContext interface { } type Ordering_termContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrdering_termContext() *Ordering_termContext { var p = new(Ordering_termContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_ordering_term return p } +func InitEmptyOrdering_termContext(p *Ordering_termContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_ordering_term +} + func (*Ordering_termContext) IsOrdering_termContext() {} func NewOrdering_termContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ordering_termContext { var p = new(Ordering_termContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_ordering_term @@ -23228,71 +25953,69 @@ func (s *Ordering_termContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Ordering_term() (localctx IOrdering_termContext) { - this := p - _ = this - localctx = NewOrdering_termContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 138, SQLiteParserRULE_ordering_term) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1920) + p.SetState(1921) p.expr(0) } - p.SetState(1923) + p.SetState(1924) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOLLATE_ { { - p.SetState(1921) + p.SetState(1922) p.Match(SQLiteParserCOLLATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1922) + p.SetState(1923) p.Collation_name() } } - p.SetState(1926) + p.SetState(1927) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { - p.SetState(1925) + p.SetState(1926) p.Asc_desc() } } - p.SetState(1930) + p.SetState(1931) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNULLS_ { { - p.SetState(1928) + p.SetState(1929) p.Match(SQLiteParserNULLS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1929) + p.SetState(1930) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserFIRST_ || _la == SQLiteParserLAST_) { @@ -23305,7 +26028,17 @@ func (p *SQLiteParser) Ordering_term() (localctx IOrdering_termContext) { } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAsc_descContext is an interface to support dynamic dispatch. @@ -23324,23 +26057,28 @@ type IAsc_descContext interface { } type Asc_descContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAsc_descContext() *Asc_descContext { var p = new(Asc_descContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_asc_desc return p } +func InitEmptyAsc_descContext(p *Asc_descContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_asc_desc +} + func (*Asc_descContext) IsAsc_descContext() {} func NewAsc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Asc_descContext { var p = new(Asc_descContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_asc_desc @@ -23379,32 +26117,13 @@ func (s *Asc_descContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Asc_desc() (localctx IAsc_descContext) { - this := p - _ = this - localctx = NewAsc_descContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 140, SQLiteParserRULE_asc_desc) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(1932) + p.SetState(1933) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserASC_ || _la == SQLiteParserDESC_) { @@ -23415,7 +26134,17 @@ func (p *SQLiteParser) Asc_desc() (localctx IAsc_descContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFrame_leftContext is an interface to support dynamic dispatch. @@ -23438,23 +26167,28 @@ type IFrame_leftContext interface { } type Frame_leftContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_leftContext() *Frame_leftContext { var p = new(Frame_leftContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_frame_left return p } +func InitEmptyFrame_leftContext(p *Frame_leftContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_frame_left +} + func (*Frame_leftContext) IsFrame_leftContext() {} func NewFrame_leftContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_leftContext { var p = new(Frame_leftContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_left @@ -23521,78 +26255,98 @@ func (s *Frame_leftContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Frame_left() (localctx IFrame_leftContext) { - this := p - _ = this - localctx = NewFrame_leftContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 142, SQLiteParserRULE_frame_left) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1944) + p.SetState(1945) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 291, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 290, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(1934) + p.SetState(1935) p.expr(0) } { - p.SetState(1935) + p.SetState(1936) p.Match(SQLiteParserPRECEDING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(1937) + p.SetState(1938) p.expr(0) } { - p.SetState(1938) + p.SetState(1939) p.Match(SQLiteParserFOLLOWING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(1940) + p.SetState(1941) p.Match(SQLiteParserCURRENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1941) + p.SetState(1942) p.Match(SQLiteParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 4: p.EnterOuterAlt(localctx, 4) { - p.SetState(1942) + p.SetState(1943) p.Match(SQLiteParserUNBOUNDED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1943) + p.SetState(1944) p.Match(SQLiteParserPRECEDING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFrame_rightContext is an interface to support dynamic dispatch. @@ -23615,23 +26369,28 @@ type IFrame_rightContext interface { } type Frame_rightContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_rightContext() *Frame_rightContext { var p = new(Frame_rightContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_frame_right return p } +func InitEmptyFrame_rightContext(p *Frame_rightContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_frame_right +} + func (*Frame_rightContext) IsFrame_rightContext() {} func NewFrame_rightContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_rightContext { var p = new(Frame_rightContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_right @@ -23698,78 +26457,98 @@ func (s *Frame_rightContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Frame_right() (localctx IFrame_rightContext) { - this := p - _ = this - localctx = NewFrame_rightContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 144, SQLiteParserRULE_frame_right) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1956) + p.SetState(1957) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 292, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 291, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(1946) + p.SetState(1947) p.expr(0) } { - p.SetState(1947) + p.SetState(1948) p.Match(SQLiteParserPRECEDING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(1949) + p.SetState(1950) p.expr(0) } { - p.SetState(1950) + p.SetState(1951) p.Match(SQLiteParserFOLLOWING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(1952) + p.SetState(1953) p.Match(SQLiteParserCURRENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1953) + p.SetState(1954) p.Match(SQLiteParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 4: p.EnterOuterAlt(localctx, 4) { - p.SetState(1954) + p.SetState(1955) p.Match(SQLiteParserUNBOUNDED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1955) + p.SetState(1956) p.Match(SQLiteParserFOLLOWING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFrame_singleContext is an interface to support dynamic dispatch. @@ -23791,23 +26570,28 @@ type IFrame_singleContext interface { } type Frame_singleContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_singleContext() *Frame_singleContext { var p = new(Frame_singleContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_frame_single return p } +func InitEmptyFrame_singleContext(p *Frame_singleContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_frame_single +} + func (*Frame_singleContext) IsFrame_singleContext() {} func NewFrame_singleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_singleContext { var p = new(Frame_singleContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_single @@ -23870,67 +26654,83 @@ func (s *Frame_singleContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Frame_single() (localctx IFrame_singleContext) { - this := p - _ = this - localctx = NewFrame_singleContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 146, SQLiteParserRULE_frame_single) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(1965) + p.SetState(1966) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 293, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 292, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(1958) + p.SetState(1959) p.expr(0) } { - p.SetState(1959) + p.SetState(1960) p.Match(SQLiteParserPRECEDING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(1961) + p.SetState(1962) p.Match(SQLiteParserUNBOUNDED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1962) + p.SetState(1963) p.Match(SQLiteParserPRECEDING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(1963) + p.SetState(1964) p.Match(SQLiteParserCURRENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1964) + p.SetState(1965) p.Match(SQLiteParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IWindow_functionContext is an interface to support dynamic dispatch. @@ -23972,23 +26772,28 @@ type IWindow_functionContext interface { } type Window_functionContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_functionContext() *Window_functionContext { var p = new(Window_functionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_window_function return p } +func InitEmptyWindow_functionContext(p *Window_functionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_window_function +} + func (*Window_functionContext) IsWindow_functionContext() {} func NewWindow_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_functionContext { var p = new(Window_functionContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_function @@ -24215,37 +27020,21 @@ func (s *Window_functionContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { - this := p - _ = this - localctx = NewWindow_functionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 148, SQLiteParserRULE_window_function) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(2052) + p.SetState(2053) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserFIRST_VALUE_, SQLiteParserLAST_VALUE_: p.EnterOuterAlt(localctx, 1) { - p.SetState(1967) + p.SetState(1968) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserFIRST_VALUE_ || _la == SQLiteParserLAST_VALUE_) { @@ -24256,60 +27045,86 @@ func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { } } { - p.SetState(1968) + p.SetState(1969) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1969) + p.SetState(1970) p.expr(0) } { - p.SetState(1970) + p.SetState(1971) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1971) + p.SetState(1972) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1972) + p.SetState(1973) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1974) + p.SetState(1975) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(1973) + p.SetState(1974) p.Partition_by() } } { - p.SetState(1976) + p.SetState(1977) p.Order_by_expr_asc_desc() } - p.SetState(1978) + p.SetState(1979) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4503599761588225) != 0 { + if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { - p.SetState(1977) + p.SetState(1978) p.Frame_clause() } } { - p.SetState(1980) + p.SetState(1981) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserCUME_DIST_, SQLiteParserPERCENT_RANK_: p.EnterOuterAlt(localctx, 2) { - p.SetState(1982) + p.SetState(1983) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserCUME_DIST_ || _la == SQLiteParserPERCENT_RANK_) { @@ -24320,55 +27135,81 @@ func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { } } { - p.SetState(1983) + p.SetState(1984) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1984) + p.SetState(1985) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1985) + p.SetState(1986) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1986) + p.SetState(1987) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(1988) + p.SetState(1989) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(1987) + p.SetState(1988) p.Partition_by() } } - p.SetState(1991) + p.SetState(1992) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { - p.SetState(1990) + p.SetState(1991) p.Order_by_expr() } } { - p.SetState(1993) + p.SetState(1994) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserDENSE_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_: p.EnterOuterAlt(localctx, 3) { - p.SetState(1994) + p.SetState(1995) _la = p.GetTokenStream().LA(1) - if !((int64((_la-161)) & ^0x3f) == 0 && ((int64(1)<<(_la-161))&385) != 0) { + if !((int64((_la-163)) & ^0x3f) == 0 && ((int64(1)<<(_la-163))&385) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -24376,45 +27217,68 @@ func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { } } { - p.SetState(1995) + p.SetState(1996) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1996) + p.SetState(1997) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1997) + p.SetState(1998) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(1998) + p.SetState(1999) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(2000) + p.SetState(2001) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(1999) + p.SetState(2000) p.Partition_by() } } { - p.SetState(2002) + p.SetState(2003) p.Order_by_expr_asc_desc() } { - p.SetState(2003) + p.SetState(2004) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserLAG_, SQLiteParserLEAD_: p.EnterOuterAlt(localctx, 4) { - p.SetState(2005) + p.SetState(2006) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserLAG_ || _la == SQLiteParserLEAD_) { @@ -24425,182 +27289,282 @@ func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { } } { - p.SetState(2006) + p.SetState(2007) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2007) + p.SetState(2008) p.expr(0) } - p.SetState(2009) + p.SetState(2010) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 299, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 298, p.GetParserRuleContext()) == 1 { { - p.SetState(2008) + p.SetState(2009) p.Of_OF_fset() } + } else if p.HasError() { // JIM + goto errorExit } - p.SetState(2012) + p.SetState(2013) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOMMA { { - p.SetState(2011) + p.SetState(2012) p.Default_DEFAULT__value() } } { - p.SetState(2014) + p.SetState(2015) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2015) + p.SetState(2016) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2016) + p.SetState(2017) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(2018) + p.SetState(2019) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(2017) + p.SetState(2018) p.Partition_by() } } { - p.SetState(2020) + p.SetState(2021) p.Order_by_expr_asc_desc() } { - p.SetState(2021) + p.SetState(2022) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserNTH_VALUE_: p.EnterOuterAlt(localctx, 5) { - p.SetState(2023) + p.SetState(2024) p.Match(SQLiteParserNTH_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2024) + p.SetState(2025) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2025) + p.SetState(2026) p.expr(0) } { - p.SetState(2026) + p.SetState(2027) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2027) + p.SetState(2028) p.Signed_number() } { - p.SetState(2028) + p.SetState(2029) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2029) + p.SetState(2030) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2030) + p.SetState(2031) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(2032) + p.SetState(2033) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(2031) + p.SetState(2032) p.Partition_by() } } { - p.SetState(2034) + p.SetState(2035) p.Order_by_expr_asc_desc() } - p.SetState(2036) + p.SetState(2037) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4503599761588225) != 0 { + if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { - p.SetState(2035) + p.SetState(2036) p.Frame_clause() } } { - p.SetState(2038) + p.SetState(2039) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserNTILE_: p.EnterOuterAlt(localctx, 6) { - p.SetState(2040) + p.SetState(2041) p.Match(SQLiteParserNTILE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2041) + p.SetState(2042) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2042) + p.SetState(2043) p.expr(0) } { - p.SetState(2043) + p.SetState(2044) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2044) + p.SetState(2045) p.Match(SQLiteParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2045) + p.SetState(2046) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(2047) + p.SetState(2048) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { - p.SetState(2046) + p.SetState(2047) p.Partition_by() } } { - p.SetState(2049) + p.SetState(2050) p.Order_by_expr_asc_desc() } { - p.SetState(2050) + p.SetState(2051) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IOf_OF_fsetContext is an interface to support dynamic dispatch. @@ -24619,23 +27583,28 @@ type IOf_OF_fsetContext interface { } type Of_OF_fsetContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOf_OF_fsetContext() *Of_OF_fsetContext { var p = new(Of_OF_fsetContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_of_OF_fset return p } +func InitEmptyOf_OF_fsetContext(p *Of_OF_fsetContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_of_OF_fset +} + func (*Of_OF_fsetContext) IsOf_OF_fsetContext() {} func NewOf_OF_fsetContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Of_OF_fsetContext { var p = new(Of_OF_fsetContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_of_OF_fset @@ -24686,39 +27655,33 @@ func (s *Of_OF_fsetContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Of_OF_fset() (localctx IOf_OF_fsetContext) { - this := p - _ = this - localctx = NewOf_OF_fsetContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 150, SQLiteParserRULE_of_OF_fset) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2054) + p.SetState(2055) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2055) + p.SetState(2056) p.Signed_number() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IDefault_DEFAULT__valueContext is an interface to support dynamic dispatch. @@ -24737,15 +27700,20 @@ type IDefault_DEFAULT__valueContext interface { } type Default_DEFAULT__valueContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDefault_DEFAULT__valueContext() *Default_DEFAULT__valueContext { var p = new(Default_DEFAULT__valueContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value + return p +} + +func InitEmptyDefault_DEFAULT__valueContext(p *Default_DEFAULT__valueContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value - return p } func (*Default_DEFAULT__valueContext) IsDefault_DEFAULT__valueContext() {} @@ -24753,7 +27721,7 @@ func (*Default_DEFAULT__valueContext) IsDefault_DEFAULT__valueContext() {} func NewDefault_DEFAULT__valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Default_DEFAULT__valueContext { var p = new(Default_DEFAULT__valueContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value @@ -24804,39 +27772,33 @@ func (s *Default_DEFAULT__valueContext) ExitRule(listener antlr.ParseTreeListene } func (p *SQLiteParser) Default_DEFAULT__value() (localctx IDefault_DEFAULT__valueContext) { - this := p - _ = this - localctx = NewDefault_DEFAULT__valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 152, SQLiteParserRULE_default_DEFAULT__value) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2057) + p.SetState(2058) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2058) + p.SetState(2059) p.Signed_number() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IPartition_byContext is an interface to support dynamic dispatch. @@ -24857,23 +27819,28 @@ type IPartition_byContext interface { } type Partition_byContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPartition_byContext() *Partition_byContext { var p = new(Partition_byContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_partition_by return p } +func InitEmptyPartition_byContext(p *Partition_byContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_partition_by +} + func (*Partition_byContext) IsPartition_byContext() {} func NewPartition_byContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Partition_byContext { var p = new(Partition_byContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_partition_by @@ -24953,60 +27920,65 @@ func (s *Partition_byContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Partition_by() (localctx IPartition_byContext) { - this := p - _ = this - localctx = NewPartition_byContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 154, SQLiteParserRULE_partition_by) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) { - p.SetState(2060) + p.SetState(2061) p.Match(SQLiteParserPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2061) + p.SetState(2062) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(2063) + p.SetState(2064) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _alt = 1 for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { switch _alt { case 1: { - p.SetState(2062) + p.SetState(2063) p.expr(0) } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } - p.SetState(2065) + p.SetState(2066) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 306, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 305, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IOrder_by_exprContext is an interface to support dynamic dispatch. @@ -25027,23 +27999,28 @@ type IOrder_by_exprContext interface { } type Order_by_exprContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrder_by_exprContext() *Order_by_exprContext { var p = new(Order_by_exprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_order_by_expr return p } +func InitEmptyOrder_by_exprContext(p *Order_by_exprContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_order_by_expr +} + func (*Order_by_exprContext) IsOrder_by_exprContext() {} func NewOrder_by_exprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_exprContext { var p = new(Order_by_exprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_order_by_expr @@ -25123,54 +28100,59 @@ func (s *Order_by_exprContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Order_by_expr() (localctx IOrder_by_exprContext) { - this := p - _ = this - localctx = NewOrder_by_exprContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 156, SQLiteParserRULE_order_by_expr) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2067) + p.SetState(2068) p.Match(SQLiteParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2068) + p.SetState(2069) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(2070) + p.SetState(2071) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - for ok := true; ok; ok = ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-33552632) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-270215977642229761) != 0) { + for ok := true; ok; ok = ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-16776415) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&-1) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&9088264048033660927) != 0) { { - p.SetState(2069) + p.SetState(2070) p.expr(0) } - p.SetState(2072) + p.SetState(2073) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IOrder_by_expr_asc_descContext is an interface to support dynamic dispatch. @@ -25190,23 +28172,28 @@ type IOrder_by_expr_asc_descContext interface { } type Order_by_expr_asc_descContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrder_by_expr_asc_descContext() *Order_by_expr_asc_descContext { var p = new(Order_by_expr_asc_descContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc return p } +func InitEmptyOrder_by_expr_asc_descContext(p *Order_by_expr_asc_descContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc +} + func (*Order_by_expr_asc_descContext) IsOrder_by_expr_asc_descContext() {} func NewOrder_by_expr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_expr_asc_descContext { var p = new(Order_by_expr_asc_descContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc @@ -25261,43 +28248,41 @@ func (s *Order_by_expr_asc_descContext) ExitRule(listener antlr.ParseTreeListene } func (p *SQLiteParser) Order_by_expr_asc_desc() (localctx IOrder_by_expr_asc_descContext) { - this := p - _ = this - localctx = NewOrder_by_expr_asc_descContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 158, SQLiteParserRULE_order_by_expr_asc_desc) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2074) + p.SetState(2075) p.Match(SQLiteParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2075) + p.SetState(2076) p.Match(SQLiteParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2076) + p.SetState(2077) p.Order_by_expr_asc_desc() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IExpr_asc_descContext is an interface to support dynamic dispatch. @@ -25320,23 +28305,28 @@ type IExpr_asc_descContext interface { } type Expr_asc_descContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyExpr_asc_descContext() *Expr_asc_descContext { var p = new(Expr_asc_descContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_expr_asc_desc return p } +func InitEmptyExpr_asc_descContext(p *Expr_asc_descContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_expr_asc_desc +} + func (*Expr_asc_descContext) IsExpr_asc_descContext() {} func NewExpr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Expr_asc_descContext { var p = new(Expr_asc_descContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_expr_asc_desc @@ -25457,76 +28447,83 @@ func (s *Expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Expr_asc_desc() (localctx IExpr_asc_descContext) { - this := p - _ = this - localctx = NewExpr_asc_descContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 160, SQLiteParserRULE_expr_asc_desc) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2078) + p.SetState(2079) p.expr(0) } - p.SetState(2080) + p.SetState(2081) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { - p.SetState(2079) + p.SetState(2080) p.Asc_desc() } } - p.SetState(2089) + p.SetState(2090) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { - p.SetState(2082) + p.SetState(2083) p.Match(SQLiteParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2083) + p.SetState(2084) p.expr(0) } - p.SetState(2085) + p.SetState(2086) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { - p.SetState(2084) + p.SetState(2085) p.Asc_desc() } } - p.SetState(2091) + p.SetState(2092) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IInitial_selectContext is an interface to support dynamic dispatch. @@ -25544,23 +28541,28 @@ type IInitial_selectContext interface { } type Initial_selectContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyInitial_selectContext() *Initial_selectContext { var p = new(Initial_selectContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_initial_select return p } +func InitEmptyInitial_selectContext(p *Initial_selectContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_initial_select +} + func (*Initial_selectContext) IsInitial_selectContext() {} func NewInitial_selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Initial_selectContext { var p = new(Initial_selectContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_initial_select @@ -25607,35 +28609,25 @@ func (s *Initial_selectContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Initial_select() (localctx IInitial_selectContext) { - this := p - _ = this - localctx = NewInitial_selectContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 162, SQLiteParserRULE_initial_select) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2092) + p.SetState(2093) p.Select_stmt() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IRecursive__selectContext is an interface to support dynamic dispatch. @@ -25653,23 +28645,28 @@ type IRecursive__selectContext interface { } type Recursive__selectContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRecursive__selectContext() *Recursive__selectContext { var p = new(Recursive__selectContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_recursive__select return p } +func InitEmptyRecursive__selectContext(p *Recursive__selectContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_recursive__select +} + func (*Recursive__selectContext) IsRecursive__selectContext() {} func NewRecursive__selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive__selectContext { var p = new(Recursive__selectContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_recursive__select @@ -25716,35 +28713,25 @@ func (s *Recursive__selectContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Recursive__select() (localctx IRecursive__selectContext) { - this := p - _ = this - localctx = NewRecursive__selectContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 164, SQLiteParserRULE_recursive__select) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2094) + p.SetState(2095) p.Select_stmt() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IUnary_operatorContext is an interface to support dynamic dispatch. @@ -25765,23 +28752,28 @@ type IUnary_operatorContext interface { } type Unary_operatorContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUnary_operatorContext() *Unary_operatorContext { var p = new(Unary_operatorContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_unary_operator return p } +func InitEmptyUnary_operatorContext(p *Unary_operatorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_unary_operator +} + func (*Unary_operatorContext) IsUnary_operatorContext() {} func NewUnary_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Unary_operatorContext { var p = new(Unary_operatorContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_unary_operator @@ -25828,35 +28820,16 @@ func (s *Unary_operatorContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Unary_operator() (localctx IUnary_operatorContext) { - this := p - _ = this - localctx = NewUnary_operatorContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 166, SQLiteParserRULE_unary_operator) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2096) + p.SetState(2097) _la = p.GetTokenStream().LA(1) - if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1792) != 0) || _la == SQLiteParserNOT_) { + if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&6400) != 0) || _la == SQLiteParserNOT_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -25864,7 +28837,17 @@ func (p *SQLiteParser) Unary_operator() (localctx IUnary_operatorContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IError_messageContext is an interface to support dynamic dispatch. @@ -25882,23 +28865,28 @@ type IError_messageContext interface { } type Error_messageContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyError_messageContext() *Error_messageContext { var p = new(Error_messageContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_error_message return p } +func InitEmptyError_messageContext(p *Error_messageContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_error_message +} + func (*Error_messageContext) IsError_messageContext() {} func NewError_messageContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Error_messageContext { var p = new(Error_messageContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_error_message @@ -25933,35 +28921,29 @@ func (s *Error_messageContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Error_message() (localctx IError_messageContext) { - this := p - _ = this - localctx = NewError_messageContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 168, SQLiteParserRULE_error_message) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2098) + p.SetState(2099) p.Match(SQLiteParserSTRING_LITERAL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IModule_argumentContext is an interface to support dynamic dispatch. @@ -25980,23 +28962,28 @@ type IModule_argumentContext interface { } type Module_argumentContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyModule_argumentContext() *Module_argumentContext { var p = new(Module_argumentContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_module_argument return p } +func InitEmptyModule_argumentContext(p *Module_argumentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_module_argument +} + func (*Module_argumentContext) IsModule_argumentContext() {} func NewModule_argumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_argumentContext { var p = new(Module_argumentContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_module_argument @@ -26059,48 +29046,44 @@ func (s *Module_argumentContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Module_argument() (localctx IModule_argumentContext) { - this := p - _ = this - localctx = NewModule_argumentContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 170, SQLiteParserRULE_module_argument) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(2102) + p.SetState(2103) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 311, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 310, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(2100) + p.SetState(2101) p.expr(0) } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(2101) + p.SetState(2102) p.Column_def() } + case antlr.ATNInvalidAltNumber: + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IColumn_aliasContext is an interface to support dynamic dispatch. @@ -26119,23 +29102,28 @@ type IColumn_aliasContext interface { } type Column_aliasContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_aliasContext() *Column_aliasContext { var p = new(Column_aliasContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_column_alias return p } +func InitEmptyColumn_aliasContext(p *Column_aliasContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_column_alias +} + func (*Column_aliasContext) IsColumn_aliasContext() {} func NewColumn_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_aliasContext { var p = new(Column_aliasContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_alias @@ -26174,32 +29162,13 @@ func (s *Column_aliasContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Column_alias() (localctx IColumn_aliasContext) { - this := p - _ = this - localctx = NewColumn_aliasContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 172, SQLiteParserRULE_column_alias) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2104) + p.SetState(2105) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) { @@ -26210,7 +29179,17 @@ func (p *SQLiteParser) Column_alias() (localctx IColumn_aliasContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IKeywordContext is an interface to support dynamic dispatch. @@ -26384,23 +29363,28 @@ type IKeywordContext interface { } type KeywordContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyKeywordContext() *KeywordContext { var p = new(KeywordContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_keyword return p } +func InitEmptyKeywordContext(p *KeywordContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_keyword +} + func (*KeywordContext) IsKeywordContext() {} func NewKeywordContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *KeywordContext { var p = new(KeywordContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_keyword @@ -27059,35 +30043,16 @@ func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Keyword() (localctx IKeywordContext) { - this := p - _ = this - localctx = NewKeywordContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 174, SQLiteParserRULE_keyword) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2106) + p.SetState(2107) _la = p.GetTokenStream().LA(1) - if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-33554432) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&18014398509481983) != 0)) { + if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-134217728) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&72057594037927935) != 0)) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -27095,7 +30060,17 @@ func (p *SQLiteParser) Keyword() (localctx IKeywordContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // INameContext is an interface to support dynamic dispatch. @@ -27113,23 +30088,28 @@ type INameContext interface { } type NameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyNameContext() *NameContext { var p = new(NameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_name return p } +func InitEmptyNameContext(p *NameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_name +} + func (*NameContext) IsNameContext() {} func NewNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NameContext { var p = new(NameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_name @@ -27176,35 +30156,25 @@ func (s *NameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Name() (localctx INameContext) { - this := p - _ = this - localctx = NewNameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 176, SQLiteParserRULE_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2108) + p.SetState(2109) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFunction_nameContext is an interface to support dynamic dispatch. @@ -27222,23 +30192,28 @@ type IFunction_nameContext interface { } type Function_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFunction_nameContext() *Function_nameContext { var p = new(Function_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_function_name return p } +func InitEmptyFunction_nameContext(p *Function_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_function_name +} + func (*Function_nameContext) IsFunction_nameContext() {} func NewFunction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Function_nameContext { var p = new(Function_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_function_name @@ -27285,35 +30260,25 @@ func (s *Function_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Function_name() (localctx IFunction_nameContext) { - this := p - _ = this - localctx = NewFunction_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 178, SQLiteParserRULE_function_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2110) + p.SetState(2111) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IQualified_function_nameContext is an interface to support dynamic dispatch. @@ -27333,23 +30298,28 @@ type IQualified_function_nameContext interface { } type Qualified_function_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyQualified_function_nameContext() *Qualified_function_nameContext { var p = new(Qualified_function_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_qualified_function_name return p } +func InitEmptyQualified_function_nameContext(p *Qualified_function_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_qualified_function_name +} + func (*Qualified_function_nameContext) IsQualified_function_nameContext() {} func NewQualified_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_function_nameContext { var p = new(Qualified_function_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_qualified_function_name @@ -27416,49 +30386,45 @@ func (s *Qualified_function_nameContext) ExitRule(listener antlr.ParseTreeListen } func (p *SQLiteParser) Qualified_function_name() (localctx IQualified_function_nameContext) { - this := p - _ = this - localctx = NewQualified_function_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 180, SQLiteParserRULE_qualified_function_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) - p.SetState(2115) + p.SetState(2116) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 312, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 311, p.GetParserRuleContext()) == 1 { { - p.SetState(2112) + p.SetState(2113) p.Schema_name() } { - p.SetState(2113) + p.SetState(2114) p.Match(SQLiteParserDOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } { - p.SetState(2117) + p.SetState(2118) p.Function_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISchema_nameContext is an interface to support dynamic dispatch. @@ -27476,23 +30442,28 @@ type ISchema_nameContext interface { } type Schema_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySchema_nameContext() *Schema_nameContext { var p = new(Schema_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_schema_name return p } +func InitEmptySchema_nameContext(p *Schema_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_schema_name +} + func (*Schema_nameContext) IsSchema_nameContext() {} func NewSchema_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Schema_nameContext { var p = new(Schema_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_schema_name @@ -27539,35 +30510,25 @@ func (s *Schema_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Schema_name() (localctx ISchema_nameContext) { - this := p - _ = this - localctx = NewSchema_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 182, SQLiteParserRULE_schema_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2119) + p.SetState(2120) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_nameContext is an interface to support dynamic dispatch. @@ -27585,23 +30546,28 @@ type ITable_nameContext interface { } type Table_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_nameContext() *Table_nameContext { var p = new(Table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_name return p } +func InitEmptyTable_nameContext(p *Table_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_name +} + func (*Table_nameContext) IsTable_nameContext() {} func NewTable_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_nameContext { var p = new(Table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_name @@ -27648,35 +30614,25 @@ func (s *Table_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Table_name() (localctx ITable_nameContext) { - this := p - _ = this - localctx = NewTable_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 184, SQLiteParserRULE_table_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2121) + p.SetState(2122) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_or_index_nameContext is an interface to support dynamic dispatch. @@ -27694,23 +30650,28 @@ type ITable_or_index_nameContext interface { } type Table_or_index_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_or_index_nameContext() *Table_or_index_nameContext { var p = new(Table_or_index_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_or_index_name return p } +func InitEmptyTable_or_index_nameContext(p *Table_or_index_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_or_index_name +} + func (*Table_or_index_nameContext) IsTable_or_index_nameContext() {} func NewTable_or_index_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_index_nameContext { var p = new(Table_or_index_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_or_index_name @@ -27757,35 +30718,25 @@ func (s *Table_or_index_nameContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Table_or_index_name() (localctx ITable_or_index_nameContext) { - this := p - _ = this - localctx = NewTable_or_index_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 186, SQLiteParserRULE_table_or_index_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2123) + p.SetState(2124) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // INew_table_nameContext is an interface to support dynamic dispatch. @@ -27803,23 +30754,28 @@ type INew_table_nameContext interface { } type New_table_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyNew_table_nameContext() *New_table_nameContext { var p = new(New_table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_new_table_name return p } +func InitEmptyNew_table_nameContext(p *New_table_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_new_table_name +} + func (*New_table_nameContext) IsNew_table_nameContext() {} func NewNew_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *New_table_nameContext { var p = new(New_table_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_new_table_name @@ -27866,35 +30822,25 @@ func (s *New_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) New_table_name() (localctx INew_table_nameContext) { - this := p - _ = this - localctx = NewNew_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 188, SQLiteParserRULE_new_table_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2125) + p.SetState(2126) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IColumn_nameContext is an interface to support dynamic dispatch. @@ -27912,23 +30858,28 @@ type IColumn_nameContext interface { } type Column_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_nameContext() *Column_nameContext { var p = new(Column_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_column_name return p } +func InitEmptyColumn_nameContext(p *Column_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_column_name +} + func (*Column_nameContext) IsColumn_nameContext() {} func NewColumn_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_nameContext { var p = new(Column_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_name @@ -27971,39 +30922,29 @@ func (s *Column_nameContext) EnterRule(listener antlr.ParseTreeListener) { func (s *Column_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitColumn_name(s) - } -} - -func (p *SQLiteParser) Column_name() (localctx IColumn_nameContext) { - this := p - _ = this - - localctx = NewColumn_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 190, SQLiteParserRULE_column_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() + } +} +func (p *SQLiteParser) Column_name() (localctx IColumn_nameContext) { + localctx = NewColumn_nameContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 190, SQLiteParserRULE_column_name) p.EnterOuterAlt(localctx, 1) { - p.SetState(2127) + p.SetState(2128) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ICollation_nameContext is an interface to support dynamic dispatch. @@ -28021,23 +30962,28 @@ type ICollation_nameContext interface { } type Collation_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCollation_nameContext() *Collation_nameContext { var p = new(Collation_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_collation_name return p } +func InitEmptyCollation_nameContext(p *Collation_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_collation_name +} + func (*Collation_nameContext) IsCollation_nameContext() {} func NewCollation_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Collation_nameContext { var p = new(Collation_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_collation_name @@ -28084,35 +31030,25 @@ func (s *Collation_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Collation_name() (localctx ICollation_nameContext) { - this := p - _ = this - localctx = NewCollation_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 192, SQLiteParserRULE_collation_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2129) + p.SetState(2130) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IForeign_tableContext is an interface to support dynamic dispatch. @@ -28130,23 +31066,28 @@ type IForeign_tableContext interface { } type Foreign_tableContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyForeign_tableContext() *Foreign_tableContext { var p = new(Foreign_tableContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_foreign_table return p } +func InitEmptyForeign_tableContext(p *Foreign_tableContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_foreign_table +} + func (*Foreign_tableContext) IsForeign_tableContext() {} func NewForeign_tableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_tableContext { var p = new(Foreign_tableContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_foreign_table @@ -28193,35 +31134,25 @@ func (s *Foreign_tableContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Foreign_table() (localctx IForeign_tableContext) { - this := p - _ = this - localctx = NewForeign_tableContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 194, SQLiteParserRULE_foreign_table) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2131) + p.SetState(2132) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IIndex_nameContext is an interface to support dynamic dispatch. @@ -28239,23 +31170,28 @@ type IIndex_nameContext interface { } type Index_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyIndex_nameContext() *Index_nameContext { var p = new(Index_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_index_name return p } +func InitEmptyIndex_nameContext(p *Index_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_index_name +} + func (*Index_nameContext) IsIndex_nameContext() {} func NewIndex_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Index_nameContext { var p = new(Index_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_index_name @@ -28302,35 +31238,25 @@ func (s *Index_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Index_name() (localctx IIndex_nameContext) { - this := p - _ = this - localctx = NewIndex_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 196, SQLiteParserRULE_index_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2133) + p.SetState(2134) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITrigger_nameContext is an interface to support dynamic dispatch. @@ -28348,23 +31274,28 @@ type ITrigger_nameContext interface { } type Trigger_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTrigger_nameContext() *Trigger_nameContext { var p = new(Trigger_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_trigger_name return p } +func InitEmptyTrigger_nameContext(p *Trigger_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_trigger_name +} + func (*Trigger_nameContext) IsTrigger_nameContext() {} func NewTrigger_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Trigger_nameContext { var p = new(Trigger_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_trigger_name @@ -28411,35 +31342,25 @@ func (s *Trigger_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Trigger_name() (localctx ITrigger_nameContext) { - this := p - _ = this - localctx = NewTrigger_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 198, SQLiteParserRULE_trigger_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2135) + p.SetState(2136) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IView_nameContext is an interface to support dynamic dispatch. @@ -28457,23 +31378,28 @@ type IView_nameContext interface { } type View_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyView_nameContext() *View_nameContext { var p = new(View_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_view_name return p } +func InitEmptyView_nameContext(p *View_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_view_name +} + func (*View_nameContext) IsView_nameContext() {} func NewView_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *View_nameContext { var p = new(View_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_view_name @@ -28520,35 +31446,25 @@ func (s *View_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) View_name() (localctx IView_nameContext) { - this := p - _ = this - localctx = NewView_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 200, SQLiteParserRULE_view_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2137) + p.SetState(2138) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IModule_nameContext is an interface to support dynamic dispatch. @@ -28566,23 +31482,28 @@ type IModule_nameContext interface { } type Module_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyModule_nameContext() *Module_nameContext { var p = new(Module_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_module_name return p } +func InitEmptyModule_nameContext(p *Module_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_module_name +} + func (*Module_nameContext) IsModule_nameContext() {} func NewModule_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_nameContext { var p = new(Module_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_module_name @@ -28629,35 +31550,25 @@ func (s *Module_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Module_name() (localctx IModule_nameContext) { - this := p - _ = this - localctx = NewModule_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 202, SQLiteParserRULE_module_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2139) + p.SetState(2140) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IPragma_nameContext is an interface to support dynamic dispatch. @@ -28675,23 +31586,28 @@ type IPragma_nameContext interface { } type Pragma_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPragma_nameContext() *Pragma_nameContext { var p = new(Pragma_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_pragma_name return p } +func InitEmptyPragma_nameContext(p *Pragma_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_pragma_name +} + func (*Pragma_nameContext) IsPragma_nameContext() {} func NewPragma_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_nameContext { var p = new(Pragma_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_pragma_name @@ -28738,35 +31654,25 @@ func (s *Pragma_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Pragma_name() (localctx IPragma_nameContext) { - this := p - _ = this - localctx = NewPragma_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 204, SQLiteParserRULE_pragma_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2141) + p.SetState(2142) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISavepoint_nameContext is an interface to support dynamic dispatch. @@ -28784,23 +31690,28 @@ type ISavepoint_nameContext interface { } type Savepoint_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySavepoint_nameContext() *Savepoint_nameContext { var p = new(Savepoint_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_savepoint_name return p } +func InitEmptySavepoint_nameContext(p *Savepoint_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_savepoint_name +} + func (*Savepoint_nameContext) IsSavepoint_nameContext() {} func NewSavepoint_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_nameContext { var p = new(Savepoint_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_savepoint_name @@ -28847,35 +31758,25 @@ func (s *Savepoint_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Savepoint_name() (localctx ISavepoint_nameContext) { - this := p - _ = this - localctx = NewSavepoint_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 206, SQLiteParserRULE_savepoint_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2143) + p.SetState(2144) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_aliasContext is an interface to support dynamic dispatch. @@ -28894,23 +31795,28 @@ type ITable_aliasContext interface { } type Table_aliasContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_aliasContext() *Table_aliasContext { var p = new(Table_aliasContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_alias return p } +func InitEmptyTable_aliasContext(p *Table_aliasContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_alias +} + func (*Table_aliasContext) IsTable_aliasContext() {} func NewTable_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_aliasContext { var p = new(Table_aliasContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_alias @@ -28949,32 +31855,13 @@ func (s *Table_aliasContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Table_alias() (localctx ITable_aliasContext) { - this := p - _ = this - localctx = NewTable_aliasContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 208, SQLiteParserRULE_table_alias) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2145) + p.SetState(2146) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) { @@ -28985,7 +31872,17 @@ func (p *SQLiteParser) Table_alias() (localctx ITable_aliasContext) { } } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_alias_fallbackContext is an interface to support dynamic dispatch. @@ -29003,23 +31900,28 @@ type ITable_alias_fallbackContext interface { } type Table_alias_fallbackContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_alias_fallbackContext() *Table_alias_fallbackContext { var p = new(Table_alias_fallbackContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_alias_fallback return p } +func InitEmptyTable_alias_fallbackContext(p *Table_alias_fallbackContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_alias_fallback +} + func (*Table_alias_fallbackContext) IsTable_alias_fallbackContext() {} func NewTable_alias_fallbackContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_alias_fallbackContext { var p = new(Table_alias_fallbackContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_alias_fallback @@ -29066,35 +31968,25 @@ func (s *Table_alias_fallbackContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Table_alias_fallback() (localctx ITable_alias_fallbackContext) { - this := p - _ = this - localctx = NewTable_alias_fallbackContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 210, SQLiteParserRULE_table_alias_fallback) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2147) + p.SetState(2148) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITransaction_nameContext is an interface to support dynamic dispatch. @@ -29112,23 +32004,28 @@ type ITransaction_nameContext interface { } type Transaction_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTransaction_nameContext() *Transaction_nameContext { var p = new(Transaction_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_transaction_name return p } +func InitEmptyTransaction_nameContext(p *Transaction_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_transaction_name +} + func (*Transaction_nameContext) IsTransaction_nameContext() {} func NewTransaction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Transaction_nameContext { var p = new(Transaction_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_transaction_name @@ -29175,35 +32072,25 @@ func (s *Transaction_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Transaction_name() (localctx ITransaction_nameContext) { - this := p - _ = this - localctx = NewTransaction_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 212, SQLiteParserRULE_transaction_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2149) + p.SetState(2150) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IWindow_nameContext is an interface to support dynamic dispatch. @@ -29221,23 +32108,28 @@ type IWindow_nameContext interface { } type Window_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_nameContext() *Window_nameContext { var p = new(Window_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_window_name return p } +func InitEmptyWindow_nameContext(p *Window_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_window_name +} + func (*Window_nameContext) IsWindow_nameContext() {} func NewWindow_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_nameContext { var p = new(Window_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_name @@ -29284,35 +32176,25 @@ func (s *Window_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Window_name() (localctx IWindow_nameContext) { - this := p - _ = this - localctx = NewWindow_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 214, SQLiteParserRULE_window_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2151) + p.SetState(2152) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAliasContext is an interface to support dynamic dispatch. @@ -29330,23 +32212,28 @@ type IAliasContext interface { } type AliasContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAliasContext() *AliasContext { var p = new(AliasContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_alias return p } +func InitEmptyAliasContext(p *AliasContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_alias +} + func (*AliasContext) IsAliasContext() {} func NewAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AliasContext { var p = new(AliasContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_alias @@ -29393,35 +32280,25 @@ func (s *AliasContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Alias() (localctx IAliasContext) { - this := p - _ = this - localctx = NewAliasContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 216, SQLiteParserRULE_alias) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2153) + p.SetState(2154) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IFilenameContext is an interface to support dynamic dispatch. @@ -29439,23 +32316,28 @@ type IFilenameContext interface { } type FilenameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFilenameContext() *FilenameContext { var p = new(FilenameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_filename return p } +func InitEmptyFilenameContext(p *FilenameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_filename +} + func (*FilenameContext) IsFilenameContext() {} func NewFilenameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilenameContext { var p = new(FilenameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_filename @@ -29502,35 +32384,25 @@ func (s *FilenameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Filename() (localctx IFilenameContext) { - this := p - _ = this - localctx = NewFilenameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 218, SQLiteParserRULE_filename) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2155) + p.SetState(2156) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IBase_window_nameContext is an interface to support dynamic dispatch. @@ -29548,23 +32420,28 @@ type IBase_window_nameContext interface { } type Base_window_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyBase_window_nameContext() *Base_window_nameContext { var p = new(Base_window_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_base_window_name return p } +func InitEmptyBase_window_nameContext(p *Base_window_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_base_window_name +} + func (*Base_window_nameContext) IsBase_window_nameContext() {} func NewBase_window_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Base_window_nameContext { var p = new(Base_window_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_base_window_name @@ -29611,35 +32488,25 @@ func (s *Base_window_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Base_window_name() (localctx IBase_window_nameContext) { - this := p - _ = this - localctx = NewBase_window_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 220, SQLiteParserRULE_base_window_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2157) + p.SetState(2158) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ISimple_funcContext is an interface to support dynamic dispatch. @@ -29657,23 +32524,28 @@ type ISimple_funcContext interface { } type Simple_funcContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySimple_funcContext() *Simple_funcContext { var p = new(Simple_funcContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_simple_func return p } +func InitEmptySimple_funcContext(p *Simple_funcContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_simple_func +} + func (*Simple_funcContext) IsSimple_funcContext() {} func NewSimple_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_funcContext { var p = new(Simple_funcContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_simple_func @@ -29720,35 +32592,25 @@ func (s *Simple_funcContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Simple_func() (localctx ISimple_funcContext) { - this := p - _ = this - localctx = NewSimple_funcContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 222, SQLiteParserRULE_simple_func) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2159) + p.SetState(2160) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAggregate_funcContext is an interface to support dynamic dispatch. @@ -29766,23 +32628,28 @@ type IAggregate_funcContext interface { } type Aggregate_funcContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAggregate_funcContext() *Aggregate_funcContext { var p = new(Aggregate_funcContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_aggregate_func return p } +func InitEmptyAggregate_funcContext(p *Aggregate_funcContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_aggregate_func +} + func (*Aggregate_funcContext) IsAggregate_funcContext() {} func NewAggregate_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_funcContext { var p = new(Aggregate_funcContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_aggregate_func @@ -29829,35 +32696,25 @@ func (s *Aggregate_funcContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Aggregate_func() (localctx IAggregate_funcContext) { - this := p - _ = this - localctx = NewAggregate_funcContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 224, SQLiteParserRULE_aggregate_func) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2161) + p.SetState(2162) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // ITable_function_nameContext is an interface to support dynamic dispatch. @@ -29875,23 +32732,28 @@ type ITable_function_nameContext interface { } type Table_function_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_function_nameContext() *Table_function_nameContext { var p = new(Table_function_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_table_function_name return p } +func InitEmptyTable_function_nameContext(p *Table_function_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_table_function_name +} + func (*Table_function_nameContext) IsTable_function_nameContext() {} func NewTable_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_function_nameContext { var p = new(Table_function_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_function_name @@ -29938,35 +32800,25 @@ func (s *Table_function_nameContext) ExitRule(listener antlr.ParseTreeListener) } func (p *SQLiteParser) Table_function_name() (localctx ITable_function_nameContext) { - this := p - _ = this - localctx = NewTable_function_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 226, SQLiteParserRULE_table_function_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { - p.SetState(2163) + p.SetState(2164) p.Any_name() } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } // IAny_nameContext is an interface to support dynamic dispatch. @@ -29989,23 +32841,28 @@ type IAny_nameContext interface { } type Any_nameContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAny_nameContext() *Any_nameContext { var p = new(Any_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = SQLiteParserRULE_any_name return p } +func InitEmptyAny_nameContext(p *Any_nameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = SQLiteParserRULE_any_name +} + func (*Any_nameContext) IsAny_nameContext() {} func NewAny_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Any_nameContext { var p = new(Any_nameContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_any_name @@ -30084,73 +32941,83 @@ func (s *Any_nameContext) ExitRule(listener antlr.ParseTreeListener) { } func (p *SQLiteParser) Any_name() (localctx IAny_nameContext) { - this := p - _ = this - localctx = NewAny_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 228, SQLiteParserRULE_any_name) - - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - - p.SetState(2172) + p.SetState(2173) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } switch p.GetTokenStream().LA(1) { case SQLiteParserIDENTIFIER: p.EnterOuterAlt(localctx, 1) { - p.SetState(2165) + p.SetState(2166) p.Match(SQLiteParserIDENTIFIER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_: p.EnterOuterAlt(localctx, 2) { - p.SetState(2166) + p.SetState(2167) p.Keyword() } case SQLiteParserSTRING_LITERAL: p.EnterOuterAlt(localctx, 3) { - p.SetState(2167) + p.SetState(2168) p.Match(SQLiteParserSTRING_LITERAL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case SQLiteParserOPEN_PAR: p.EnterOuterAlt(localctx, 4) { - p.SetState(2168) + p.SetState(2169) p.Match(SQLiteParserOPEN_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(2169) + p.SetState(2170) p.Any_name() } { - p.SetState(2170) + p.SetState(2171) p.Match(SQLiteParserCLOSE_PAR) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } func (p *SQLiteParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { @@ -30168,47 +33035,47 @@ func (p *SQLiteParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex } func (p *SQLiteParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool { - this := p - _ = this - switch predIndex { case 0: - return p.Precpred(p.GetParserRuleContext(), 19) + return p.Precpred(p.GetParserRuleContext(), 20) case 1: - return p.Precpred(p.GetParserRuleContext(), 18) + return p.Precpred(p.GetParserRuleContext(), 19) case 2: - return p.Precpred(p.GetParserRuleContext(), 17) + return p.Precpred(p.GetParserRuleContext(), 18) case 3: - return p.Precpred(p.GetParserRuleContext(), 16) + return p.Precpred(p.GetParserRuleContext(), 17) case 4: - return p.Precpred(p.GetParserRuleContext(), 15) + return p.Precpred(p.GetParserRuleContext(), 16) case 5: - return p.Precpred(p.GetParserRuleContext(), 14) + return p.Precpred(p.GetParserRuleContext(), 15) case 6: - return p.Precpred(p.GetParserRuleContext(), 12) + return p.Precpred(p.GetParserRuleContext(), 14) case 7: - return p.Precpred(p.GetParserRuleContext(), 11) + return p.Precpred(p.GetParserRuleContext(), 12) case 8: - return p.Precpred(p.GetParserRuleContext(), 4) + return p.Precpred(p.GetParserRuleContext(), 11) case 9: - return p.Precpred(p.GetParserRuleContext(), 13) + return p.Precpred(p.GetParserRuleContext(), 4) case 10: - return p.Precpred(p.GetParserRuleContext(), 7) + return p.Precpred(p.GetParserRuleContext(), 13) case 11: - return p.Precpred(p.GetParserRuleContext(), 6) + return p.Precpred(p.GetParserRuleContext(), 7) case 12: + return p.Precpred(p.GetParserRuleContext(), 6) + + case 13: return p.Precpred(p.GetParserRuleContext(), 5) default: diff --git a/internal/engine/sqlite/parser/sqliteparser_base_listener.go b/internal/engine/sqlite/parser/sqliteparser_base_listener.go index 27a6bf8578..1480f105f7 100644 --- a/internal/engine/sqlite/parser/sqliteparser_base_listener.go +++ b/internal/engine/sqlite/parser/sqliteparser_base_listener.go @@ -1,8 +1,8 @@ -// Code generated from SQLiteParser.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser // SQLiteParser -import "github.com/antlr/antlr4/runtime/Go/antlr/v4" +import "github.com/antlr4-go/antlr/v4" // BaseSQLiteParserListener is a complete listener for a parse tree produced by SQLiteParser. type BaseSQLiteParserListener struct{} @@ -252,6 +252,12 @@ func (s *BaseSQLiteParserListener) EnterExpr_comparison(ctx *Expr_comparisonCont // ExitExpr_comparison is called when production expr_comparison is exited. func (s *BaseSQLiteParserListener) ExitExpr_comparison(ctx *Expr_comparisonContext) {} +// EnterExpr_bool is called when production expr_bool is entered. +func (s *BaseSQLiteParserListener) EnterExpr_bool(ctx *Expr_boolContext) {} + +// ExitExpr_bool is called when production expr_bool is exited. +func (s *BaseSQLiteParserListener) ExitExpr_bool(ctx *Expr_boolContext) {} + // EnterExpr_binary is called when production expr_binary is entered. func (s *BaseSQLiteParserListener) EnterExpr_binary(ctx *Expr_binaryContext) {} @@ -302,12 +308,6 @@ func (s *BaseSQLiteParserListener) EnterExpr_qualified_column_name(ctx *Expr_qua func (s *BaseSQLiteParserListener) ExitExpr_qualified_column_name(ctx *Expr_qualified_column_nameContext) { } -// EnterExpr_math_op is called when production expr_math_op is entered. -func (s *BaseSQLiteParserListener) EnterExpr_math_op(ctx *Expr_math_opContext) {} - -// ExitExpr_math_op is called when production expr_math_op is exited. -func (s *BaseSQLiteParserListener) ExitExpr_math_op(ctx *Expr_math_opContext) {} - // EnterExpr_unary is called when production expr_unary is entered. func (s *BaseSQLiteParserListener) EnterExpr_unary(ctx *Expr_unaryContext) {} diff --git a/internal/engine/sqlite/parser/sqliteparser_listener.go b/internal/engine/sqlite/parser/sqliteparser_listener.go index f121faf872..4dfcb9632f 100644 --- a/internal/engine/sqlite/parser/sqliteparser_listener.go +++ b/internal/engine/sqlite/parser/sqliteparser_listener.go @@ -1,8 +1,8 @@ -// Code generated from SQLiteParser.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser // SQLiteParser -import "github.com/antlr/antlr4/runtime/Go/antlr/v4" +import "github.com/antlr4-go/antlr/v4" // SQLiteParserListener is a complete listener for a parse tree produced by SQLiteParser. type SQLiteParserListener interface { @@ -122,6 +122,9 @@ type SQLiteParserListener interface { // EnterExpr_comparison is called when entering the expr_comparison production. EnterExpr_comparison(c *Expr_comparisonContext) + // EnterExpr_bool is called when entering the expr_bool production. + EnterExpr_bool(c *Expr_boolContext) + // EnterExpr_binary is called when entering the expr_binary production. EnterExpr_binary(c *Expr_binaryContext) @@ -146,9 +149,6 @@ type SQLiteParserListener interface { // EnterExpr_qualified_column_name is called when entering the expr_qualified_column_name production. EnterExpr_qualified_column_name(c *Expr_qualified_column_nameContext) - // EnterExpr_math_op is called when entering the expr_math_op production. - EnterExpr_math_op(c *Expr_math_opContext) - // EnterExpr_unary is called when entering the expr_unary production. EnterExpr_unary(c *Expr_unaryContext) @@ -512,6 +512,9 @@ type SQLiteParserListener interface { // ExitExpr_comparison is called when exiting the expr_comparison production. ExitExpr_comparison(c *Expr_comparisonContext) + // ExitExpr_bool is called when exiting the expr_bool production. + ExitExpr_bool(c *Expr_boolContext) + // ExitExpr_binary is called when exiting the expr_binary production. ExitExpr_binary(c *Expr_binaryContext) @@ -536,9 +539,6 @@ type SQLiteParserListener interface { // ExitExpr_qualified_column_name is called when exiting the expr_qualified_column_name production. ExitExpr_qualified_column_name(c *Expr_qualified_column_nameContext) - // ExitExpr_math_op is called when exiting the expr_math_op production. - ExitExpr_math_op(c *Expr_math_opContext) - // ExitExpr_unary is called when exiting the expr_unary production. ExitExpr_unary(c *Expr_unaryContext) diff --git a/internal/engine/sqlite/utils.go b/internal/engine/sqlite/utils.go index f3b5ee289d..874d53ab41 100644 --- a/internal/engine/sqlite/utils.go +++ b/internal/engine/sqlite/utils.go @@ -12,7 +12,7 @@ type tableNamer interface { func parseTableName(c tableNamer) *ast.TableName { name := ast.TableName{ - Name: c.Table_name().GetText(), + Name: identifier(c.Table_name().GetText()), } if c.Schema_name() != nil { name.Schema = c.Schema_name().GetText() diff --git a/internal/ext/handler.go b/internal/ext/handler.go index adeacff695..2542dc1a82 100644 --- a/internal/ext/handler.go +++ b/internal/ext/handler.go @@ -2,22 +2,51 @@ package ext import ( "context" + "fmt" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "github.com/sqlc-dev/sqlc/internal/plugin" ) type Handler interface { - Generate(context.Context, *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) + Generate(context.Context, *plugin.GenerateRequest) (*plugin.GenerateResponse, error) + + Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error + NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) } type wrapper struct { - fn func(context.Context, *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) + fn func(context.Context, *plugin.GenerateRequest) (*plugin.GenerateResponse, error) } -func (w *wrapper) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { +func (w *wrapper) Generate(ctx context.Context, req *plugin.GenerateRequest) (*plugin.GenerateResponse, error) { return w.fn(ctx, req) } -func HandleFunc(fn func(context.Context, *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error)) Handler { +func (w *wrapper) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error { + req, ok := args.(*plugin.GenerateRequest) + if !ok { + return fmt.Errorf("args isn't a GenerateRequest") + } + resp, ok := reply.(*plugin.GenerateResponse) + if !ok { + return fmt.Errorf("reply isn't a GenerateResponse") + } + res, err := w.Generate(ctx, req) + if err != nil { + return err + } + resp.Files = res.Files + return nil +} + +func (w *wrapper) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, status.Error(codes.Unimplemented, "") +} + +func HandleFunc(fn func(context.Context, *plugin.GenerateRequest) (*plugin.GenerateResponse, error)) Handler { return &wrapper{fn} } diff --git a/internal/ext/process/gen.go b/internal/ext/process/gen.go index 8022941ed4..b5720dbc33 100644 --- a/internal/ext/process/gen.go +++ b/internal/ext/process/gen.go @@ -8,33 +8,61 @@ import ( "os" "os/exec" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" - "github.com/sqlc-dev/sqlc/internal/plugin" + "github.com/sqlc-dev/sqlc/internal/info" ) type Runner struct { - Cmd string - Env []string + Cmd string + Format string + Env []string } -// TODO: Update the gen func signature to take a ctx -func (r Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { - stdin, err := proto.Marshal(req) - if err != nil { - return nil, fmt.Errorf("failed to encode codegen request: %s", err) +func (r *Runner) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error { + req, ok := args.(protoreflect.ProtoMessage) + if !ok { + return fmt.Errorf("args isn't a protoreflect.ProtoMessage") + } + + var stdin []byte + var err error + switch r.Format { + case "json": + m := &protojson.MarshalOptions{ + EmitUnpopulated: true, + Indent: "", + UseProtoNames: true, + } + stdin, err = m.Marshal(req) + + if err != nil { + return fmt.Errorf("failed to encode codegen request: %w", err) + } + case "", "protobuf": + stdin, err = proto.Marshal(req) + if err != nil { + return fmt.Errorf("failed to encode codegen request: %w", err) + } + default: + return fmt.Errorf("unknown plugin format: %s", r.Format) } // Check if the output plugin exists path, err := exec.LookPath(r.Cmd) if err != nil { - return nil, fmt.Errorf("process: %s not found", r.Cmd) + return fmt.Errorf("process: %s not found", r.Cmd) } - cmd := exec.CommandContext(ctx, path) + cmd := exec.CommandContext(ctx, path, method) cmd.Stdin = bytes.NewReader(stdin) cmd.Env = []string{ - fmt.Sprintf("SQLC_VERSION=%s", req.SqlcVersion), + fmt.Sprintf("SQLC_VERSION=%s", info.Version), } for _, key := range r.Env { if key == "SQLC_AUTH_TOKEN" { @@ -50,13 +78,28 @@ func (r Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plug if errors.As(err, &exit) { stderr = string(exit.Stderr) } - return nil, fmt.Errorf("process: error running command %s", stderr) + return fmt.Errorf("process: error running command %s", stderr) } - var resp plugin.CodeGenResponse - if err := proto.Unmarshal(out, &resp); err != nil { - return nil, fmt.Errorf("process: failed to read codegen resp: %s", err) + resp, ok := reply.(protoreflect.ProtoMessage) + if !ok { + return fmt.Errorf("reply isn't a protoreflect.ProtoMessage") } - return &resp, nil + switch r.Format { + case "json": + if err := protojson.Unmarshal(out, resp); err != nil { + return fmt.Errorf("process: failed to read codegen resp: %w", err) + } + default: + if err := proto.Unmarshal(out, resp); err != nil { + return fmt.Errorf("process: failed to read codegen resp: %w", err) + } + } + + return nil +} + +func (r *Runner) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, status.Error(codes.Unimplemented, "") } diff --git a/internal/ext/wasm/nowasm.go b/internal/ext/wasm/nowasm.go deleted file mode 100644 index c28db6fc73..0000000000 --- a/internal/ext/wasm/nowasm.go +++ /dev/null @@ -1,14 +0,0 @@ -//go:build nowasm || !(cgo && ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64))) - -package wasm - -import ( - "context" - "fmt" - - "github.com/sqlc-dev/sqlc/internal/plugin" -) - -func (r *Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { - return nil, fmt.Errorf("sqlc built without wasmtime support") -} diff --git a/internal/ext/wasm/wasm.go b/internal/ext/wasm/wasm.go index f626dbfd14..58384a9c95 100644 --- a/internal/ext/wasm/wasm.go +++ b/internal/ext/wasm/wasm.go @@ -1,79 +1,57 @@ -//go:build !nowasm && cgo && ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64)) - -// The above build constraint is based of the cgo directives in this file: -// https://github.com/bytecodealliance/wasmtime-go/blob/main/ffi.go package wasm import ( + "bytes" "context" "crypto/sha256" "errors" "fmt" "io" + "log/slog" "net/http" "os" "path/filepath" "runtime" - "runtime/trace" "strings" - wasmtime "github.com/bytecodealliance/wasmtime-go/v14" + "github.com/tetratelabs/wazero" + "github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1" + "github.com/tetratelabs/wazero/sys" "golang.org/x/sync/singleflight" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" "github.com/sqlc-dev/sqlc/internal/cache" "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/plugin" ) -// This version must be updated whenever the wasmtime-go dependency is updated -const wasmtimeVersion = `v14.0.0` - -func cacheDir() (string, error) { - cache := os.Getenv("SQLCCACHE") - if cache != "" { - return cache, nil - } - cacheHome := os.Getenv("XDG_CACHE_HOME") - if cacheHome == "" { - home, err := os.UserHomeDir() - if err != nil { - return "", err - } - cacheHome = filepath.Join(home, ".cache") - } - return filepath.Join(cacheHome, "sqlc"), nil -} - var flight singleflight.Group -// Verify the provided sha256 is valid. -func (r *Runner) parseChecksum() (string, error) { - if r.SHA256 == "" { - return "", fmt.Errorf("missing SHA-256 checksum") - } - return r.SHA256, nil +type runtimeAndCode struct { + rt wazero.Runtime + code wazero.CompiledModule } -func (r *Runner) loadModule(ctx context.Context, engine *wasmtime.Engine) (*wasmtime.Module, error) { - expected, err := r.parseChecksum() - if err != nil { - return nil, err +// Verify the provided sha256 is valid. +func (r *Runner) getChecksum(ctx context.Context) (string, error) { + if r.SHA256 != "" { + return r.SHA256, nil } - value, err, _ := flight.Do(expected, func() (interface{}, error) { - return r.loadSerializedModule(ctx, engine) - }) + // TODO: Add a log line here about something + _, sum, err := r.fetch(ctx, r.URL) if err != nil { - return nil, err - } - data, ok := value.([]byte) - if !ok { - return nil, fmt.Errorf("returned value was not a byte slice") + return "", err } - return wasmtime.NewModuleDeserialize(engine, data) + slog.Warn("fetching WASM binary to calculate sha256. Set this value in sqlc.yaml to prevent unneeded work", "sha256", sum) + return sum, nil } -func (r *Runner) loadSerializedModule(ctx context.Context, engine *wasmtime.Engine) ([]byte, error) { - expected, err := r.parseChecksum() +func (r *Runner) loadAndCompile(ctx context.Context) (*runtimeAndCode, error) { + expected, err := r.getChecksum(ctx) if err != nil { return nil, err } @@ -81,93 +59,75 @@ func (r *Runner) loadSerializedModule(ctx context.Context, engine *wasmtime.Engi if err != nil { return nil, err } - - 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) - if staterr == nil { - data, err := os.ReadFile(modPath) - if err != nil { - return nil, err - } - return data, nil - } - - wmod, err := r.loadWASM(ctx, cacheDir, expected) + value, err, _ := flight.Do(expected, func() (interface{}, error) { + return r.loadAndCompileWASM(ctx, cacheDir, expected) + }) if err != nil { return nil, err } - - moduRegion := trace.StartRegion(ctx, "wasmtime.NewModule") - module, err := wasmtime.NewModule(engine, wmod) - moduRegion.End() - if err != nil { - return nil, fmt.Errorf("define wasi: %w", err) - } - - err = os.Mkdir(pluginDir, 0755) - if err != nil && !os.IsExist(err) { - return nil, fmt.Errorf("mkdirall: %w", err) - } - out, err := module.Serialize() - if err != nil { - return nil, fmt.Errorf("serialize: %w", err) - } - if err := os.WriteFile(modPath, out, 0444); err != nil { - return nil, fmt.Errorf("cache wasm: %w", err) + data, ok := value.(*runtimeAndCode) + if !ok { + return nil, fmt.Errorf("returned value was not a compiled module") } - - return out, nil + return data, nil } -func (r *Runner) loadWASM(ctx context.Context, cache string, expected string) ([]byte, error) { - pluginDir := filepath.Join(cache, expected) - pluginPath := filepath.Join(pluginDir, "plugin.wasm") - _, staterr := os.Stat(pluginPath) - +func (r *Runner) fetch(ctx context.Context, uri string) ([]byte, string, error) { var body io.ReadCloser + switch { - case staterr == nil: - file, err := os.Open(pluginPath) - if err != nil { - return nil, fmt.Errorf("os.Open: %s %w", pluginPath, err) - } - body = file - case strings.HasPrefix(r.URL, "file://"): - file, err := os.Open(strings.TrimPrefix(r.URL, "file://")) + case strings.HasPrefix(uri, "file://"): + file, err := os.Open(strings.TrimPrefix(uri, "file://")) if err != nil { - return nil, fmt.Errorf("os.Open: %s %w", r.URL, err) + return nil, "", fmt.Errorf("os.Open: %s %w", uri, err) } body = file - case strings.HasPrefix(r.URL, "https://"): - req, err := http.NewRequestWithContext(ctx, "GET", r.URL, nil) + case strings.HasPrefix(uri, "https://"): + req, err := http.NewRequestWithContext(ctx, "GET", uri, nil) if err != nil { - return nil, fmt.Errorf("http.Get: %s %w", r.URL, err) + return nil, "", fmt.Errorf("http.Get: %s %w", uri, err) } req.Header.Set("User-Agent", fmt.Sprintf("sqlc/%s Go/%s (%s %s)", info.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH)) resp, err := http.DefaultClient.Do(req) if err != nil { - return nil, fmt.Errorf("http.Get: %s %w", r.URL, err) + return nil, "", fmt.Errorf("http.Get: %s %w", r.URL, err) } body = resp.Body default: - return nil, fmt.Errorf("unknown scheme: %s", r.URL) + return nil, "", fmt.Errorf("unknown scheme: %s", r.URL) } defer body.Close() wmod, err := io.ReadAll(body) if err != nil { - return nil, fmt.Errorf("readall: %w", err) + return nil, "", fmt.Errorf("readall: %w", err) } sum := sha256.Sum256(wmod) actual := fmt.Sprintf("%x", sum) + return wmod, actual, nil +} + +func (r *Runner) loadAndCompileWASM(ctx context.Context, cache string, expected string) (*runtimeAndCode, error) { + pluginDir := filepath.Join(cache, expected) + pluginPath := filepath.Join(pluginDir, "plugin.wasm") + _, staterr := os.Stat(pluginPath) + + uri := r.URL + if staterr == nil { + uri = "file://" + pluginPath + } + + wmod, actual, err := r.fetch(ctx, uri) + if err != nil { + return nil, err + } + if expected != actual { return nil, fmt.Errorf("invalid checksum: expected %s, got %s", expected, actual) } @@ -182,14 +142,33 @@ func (r *Runner) loadWASM(ctx context.Context, cache string, expected string) ([ } } - return wmod, nil + wazeroCache, err := wazero.NewCompilationCacheWithDir(filepath.Join(cache, "wazero")) + if err != nil { + return nil, fmt.Errorf("wazero.NewCompilationCacheWithDir: %w", err) + } + + config := wazero.NewRuntimeConfig().WithCompilationCache(wazeroCache) + rt := wazero.NewRuntimeWithConfig(ctx, config) + + if _, err := wasi_snapshot_preview1.Instantiate(ctx, rt); err != nil { + return nil, fmt.Errorf("wasi_snapshot_preview1 instantiate: %w", err) + } + + // Compile the Wasm binary once so that we can skip the entire compilation + // time during instantiation. + code, err := rt.CompileModule(ctx, wmod) + if err != nil { + return nil, fmt.Errorf("compile module: %w", err) + } + + return &runtimeAndCode{rt: rt, code: code}, nil } // removePGCatalog removes the pg_catalog schema from the request. There is a // mysterious (reason unknown) bug with wasm plugins when a large amount of // tables (like there are in the catalog) are sent. // @see https://github.com/sqlc-dev/sqlc/pull/1748 -func removePGCatalog(req *plugin.CodeGenRequest) { +func removePGCatalog(req *plugin.GenerateRequest) { if req.Catalog == nil || req.Catalog.Schemas == nil { return } @@ -206,105 +185,84 @@ func removePGCatalog(req *plugin.CodeGenRequest) { req.Catalog.Schemas = filtered } -func (r *Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { - // Remove the pg_catalog schema. Its sheer size causes unknown issues with wasm plugins - removePGCatalog(req) - - stdinBlob, err := req.MarshalVT() - if err != nil { - return nil, err - } - - engine := wasmtime.NewEngine() - module, err := r.loadModule(ctx, engine) - if err != nil { - return nil, fmt.Errorf("loadModule: %w", err) +func (r *Runner) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error { + req, ok := args.(protoreflect.ProtoMessage) + if !ok { + return status.Error(codes.InvalidArgument, "args isn't a protoreflect.ProtoMessage") } - linker := wasmtime.NewLinker(engine) - if err := linker.DefineWasi(); err != nil { - return nil, err + // Remove the pg_catalog schema. Its sheer size causes unknown issues with wasm plugins + genReq, ok := req.(*plugin.GenerateRequest) + if ok { + removePGCatalog(genReq) + req = genReq } - dir, err := os.MkdirTemp(os.Getenv("SQLCTMPDIR"), "out") + stdinBlob, err := proto.Marshal(req) if err != nil { - return nil, fmt.Errorf("temp dir: %w", err) + return fmt.Errorf("failed to encode codegen request: %w", err) } - defer os.RemoveAll(dir) - stdinPath := filepath.Join(dir, "stdin") - stderrPath := filepath.Join(dir, "stderr") - stdoutPath := filepath.Join(dir, "stdout") - - if err := os.WriteFile(stdinPath, stdinBlob, 0755); err != nil { - return nil, fmt.Errorf("write file: %w", err) + runtimeAndCode, err := r.loadAndCompile(ctx) + if err != nil { + return fmt.Errorf("loadBytes: %w", err) } - // Configure WASI imports to write stdout into a file. - wasiConfig := wasmtime.NewWasiConfig() - wasiConfig.SetStdinFile(stdinPath) - wasiConfig.SetStdoutFile(stdoutPath) - wasiConfig.SetStderrFile(stderrPath) + var stderr, stdout bytes.Buffer - keys := []string{"SQLC_VERSION"} - vals := []string{req.SqlcVersion} + conf := wazero.NewModuleConfig(). + WithName(""). + WithArgs("plugin.wasm", method). + WithStdin(bytes.NewReader(stdinBlob)). + WithStdout(&stdout). + WithStderr(&stderr). + WithEnv("SQLC_VERSION", info.Version) for _, key := range r.Env { - keys = append(keys, key) - vals = append(vals, os.Getenv(key)) + conf = conf.WithEnv(key, os.Getenv(key)) } - wasiConfig.SetEnv(keys, vals) - store := wasmtime.NewStore(engine) - store.SetWasi(wasiConfig) - - linkRegion := trace.StartRegion(ctx, "linker.DefineModule") - err = linker.DefineModule(store, "", module) - linkRegion.End() - if err != nil { - return nil, fmt.Errorf("define wasi: %w", err) + result, err := runtimeAndCode.rt.InstantiateModule(ctx, runtimeAndCode.code, conf) + if err == nil { + defer result.Close(ctx) } - - // Run the function - fn, err := linker.GetDefault(store, "") - if err != nil { - return nil, fmt.Errorf("wasi: get default: %w", err) + if cerr := checkError(err, stderr); cerr != nil { + return cerr } - callRegion := trace.StartRegion(ctx, "call _start") - _, err = fn.Call(store) - callRegion.End() + // Print WASM stdout + stdoutBlob := stdout.Bytes() - if cerr := checkError(err, stderrPath); cerr != nil { - return nil, cerr + resp, ok := reply.(protoreflect.ProtoMessage) + if !ok { + return fmt.Errorf("reply isn't a GenerateResponse") } - // Print WASM stdout - stdoutBlob, err := os.ReadFile(stdoutPath) - if err != nil { - return nil, fmt.Errorf("read file: %w", err) + if err := proto.Unmarshal(stdoutBlob, resp); err != nil { + return err } - var resp plugin.CodeGenResponse - return &resp, resp.UnmarshalVT(stdoutBlob) + return nil } -func checkError(err error, stderrPath string) error { +func (r *Runner) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, status.Error(codes.Unimplemented, "") +} + +func checkError(err error, stderr bytes.Buffer) error { if err == nil { return err } - var wtError *wasmtime.Error - if errors.As(err, &wtError) { - if code, ok := wtError.ExitStatus(); ok { - if code == 0 { - return nil - } + if exitErr, ok := err.(*sys.ExitError); ok { + if exitErr.ExitCode() == 0 { + return nil } } + // Print WASM stdout - stderrBlob, rferr := os.ReadFile(stderrPath) - if rferr == nil && len(stderrBlob) > 0 { - return errors.New(string(stderrBlob)) + stderrBlob := stderr.String() + if len(stderrBlob) > 0 { + return errors.New(stderrBlob) } return fmt.Errorf("call: %w", err) } diff --git a/internal/inflection/singular.go b/internal/inflection/singular.go index edac927603..64e042a6ab 100644 --- a/internal/inflection/singular.go +++ b/internal/inflection/singular.go @@ -43,5 +43,10 @@ func Singular(s SingularParams) string { if strings.ToLower(s.Name) == "waves" { return "wave" } + + if strings.ToLower(s.Name) == "metadata" { + return "metadata" + } + return upstream.Singular(s.Name) } diff --git a/internal/info/facts.go b/internal/info/facts.go index ead2fed25c..dbae7b84ae 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.23.0" +const Version = "v1.30.0" diff --git a/internal/metadata/meta.go b/internal/metadata/meta.go index 97ff36dbd2..8f63624d2c 100644 --- a/internal/metadata/meta.go +++ b/internal/metadata/meta.go @@ -3,6 +3,7 @@ package metadata import ( "bufio" "fmt" + "github.com/sqlc-dev/sqlc/internal/constants" "strings" "unicode" @@ -18,6 +19,10 @@ type Metadata struct { Params map[string]string Flags map[string]bool + // RuleSkiplist contains the names of rules to disable vetting for. + // If the map is empty, but the disable vet flag is specified, then all rules are ignored. + RuleSkiplist map[string]struct{} + Filename string } @@ -113,9 +118,12 @@ func ParseQueryNameAndType(t string, commentStyle CommentSyntax) (string, string return "", "", nil } -func ParseParamsAndFlags(comments []string) (map[string]string, map[string]bool, error) { +// ParseCommentFlags processes the comments provided with queries to determine the metadata params, flags and rules to skip. +// All flags in query comments are prefixed with `@`, e.g. @param, @@sqlc-vet-disable. +func ParseCommentFlags(comments []string) (map[string]string, map[string]bool, map[string]struct{}, error) { params := make(map[string]string) flags := make(map[string]bool) + ruleSkiplist := make(map[string]struct{}) for _, line := range comments { s := bufio.NewScanner(strings.NewReader(line)) @@ -129,7 +137,7 @@ func ParseParamsAndFlags(comments []string) (map[string]string, map[string]bool, } switch token { - case "@param": + case constants.QueryFlagParam: s.Scan() name := s.Text() var rest []string @@ -138,14 +146,27 @@ func ParseParamsAndFlags(comments []string) (map[string]string, map[string]bool, rest = append(rest, paramToken) } params[name] = strings.Join(rest, " ") + + case constants.QueryFlagSqlcVetDisable: + flags[token] = true + + // Vet rules can all be disabled in the same line or split across lines .i.e. + // /* @sqlc-vet-disable sqlc/db-prepare delete-without-where */ + // is equivalent to: + // /* @sqlc-vet-disable sqlc/db-prepare */ + // /* @sqlc-vet-disable delete-without-where */ + for s.Scan() { + ruleSkiplist[s.Text()] = struct{}{} + } + default: flags[token] = true } if s.Err() != nil { - return params, flags, s.Err() + return params, flags, ruleSkiplist, s.Err() } } - return params, flags, nil + return params, flags, ruleSkiplist, nil } diff --git a/internal/metadata/meta_test.go b/internal/metadata/meta_test.go index 3c2be6d6de..e9ef54586e 100644 --- a/internal/metadata/meta_test.go +++ b/internal/metadata/meta_test.go @@ -1,6 +1,8 @@ package metadata -import "testing" +import ( + "testing" +) func TestParseQueryNameAndType(t *testing.T) { @@ -77,7 +79,7 @@ func TestParseQueryParams(t *testing.T) { " @param @invalid UUID ", }, } { - params, _, err := ParseParamsAndFlags(comments) + params, _, _, err := ParseCommentFlags(comments) if err != nil { t.Errorf("expected comments to parse, got err: %s", err) } @@ -123,7 +125,7 @@ func TestParseQueryFlags(t *testing.T) { " @param @flag-bar UUID", }, } { - _, flags, err := ParseParamsAndFlags(comments) + _, flags, _, err := ParseCommentFlags(comments) if err != nil { t.Errorf("expected comments to parse, got err: %s", err) } @@ -137,3 +139,44 @@ func TestParseQueryFlags(t *testing.T) { } } } + +func TestParseQueryRuleSkiplist(t *testing.T) { + for _, comments := range [][]string{ + { + " name: CreateFoo :one", + " @sqlc-vet-disable sqlc/db-prepare delete-without-where ", + }, + { + " name: CreateFoo :one ", + " @sqlc-vet-disable sqlc/db-prepare ", + " @sqlc-vet-disable delete-without-where ", + }, + { + " name: CreateFoo :one", + " @sqlc-vet-disable sqlc/db-prepare ", + " update-without where", + " @sqlc-vet-disable delete-without-where ", + }, + } { + _, flags, ruleSkiplist, err := ParseCommentFlags(comments) + if err != nil { + t.Errorf("expected comments to parse, got err: %s", err) + } + + if !flags["@sqlc-vet-disable"] { + t.Errorf("expected @sqlc-vet-disable flag not found") + } + + if _, ok := ruleSkiplist["sqlc/db-prepare"]; !ok { + t.Errorf("expected rule not found in skiplist") + } + + if _, ok := ruleSkiplist["delete-without-where"]; !ok { + t.Errorf("expected rule not found in skiplist") + } + + if _, ok := ruleSkiplist["update-without-where"]; ok { + t.Errorf("unexpected rule found in skiplist") + } + } +} diff --git a/internal/migrations/migrations.go b/internal/migrations/migrations.go index ac0e8b3d9a..4ade6045a4 100644 --- a/internal/migrations/migrations.go +++ b/internal/migrations/migrations.go @@ -15,16 +15,17 @@ func RemoveRollbackStatements(contents string) string { s := bufio.NewScanner(strings.NewReader(contents)) var lines []string for s.Scan() { - if strings.HasPrefix(s.Text(), "-- +goose Down") { + statement := strings.ToLower(s.Text()) + if strings.HasPrefix(statement, "-- +goose down") { break } - if strings.HasPrefix(s.Text(), "-- +migrate Down") { + if strings.HasPrefix(statement, "-- +migrate down") { break } - if strings.HasPrefix(s.Text(), "---- create above / drop below ----") { + if strings.HasPrefix(statement, "---- create above / drop below ----") { break } - if strings.HasPrefix(s.Text(), "-- migrate:down") { + if strings.HasPrefix(statement, "-- migrate:down") { break } lines = append(lines, s.Text()) diff --git a/internal/pgx/poolcache/poolcache.go b/internal/pgx/poolcache/poolcache.go new file mode 100644 index 0000000000..3fce3cb131 --- /dev/null +++ b/internal/pgx/poolcache/poolcache.go @@ -0,0 +1,61 @@ +package poolcache + +import ( + "context" + "fmt" + "sync" + + "github.com/jackc/pgx/v5/pgxpool" +) + +type Cache struct { + lock sync.RWMutex + closed bool + pools map[string]*pgxpool.Pool +} + +func New() *Cache { + return &Cache{ + pools: map[string]*pgxpool.Pool{}, + } +} + +func (c *Cache) Open(ctx context.Context, uri string) (*pgxpool.Pool, error) { + if c.closed { + return nil, fmt.Errorf("poolcache is closed") + } + + c.lock.RLock() + existing, found := c.pools[uri] + c.lock.RUnlock() + + if found { + return existing, nil + } + + pool, err := pgxpool.New(ctx, uri) + if err != nil { + return nil, err + } + + c.lock.Lock() + c.pools[uri] = pool + c.lock.Unlock() + + return pool, nil +} + +func (c *Cache) Close() error { + c.lock.Lock() + defer c.lock.Unlock() + + var closeErr error + for _, pool := range c.pools { + pool.Close() + } + + c.closed = true + clear(c.pools) + + return closeErr +} diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index 7b3347c6e1..525ffc72ef 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -75,211 +75,22 @@ func (x *File) GetContents() []byte { return nil } -type Override struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name of the type to use, e.g. `github.com/segmentio/ksuid.KSUID` or `mymodule.Type` - CodeType string `protobuf:"bytes,1,opt,name=code_type,proto3" json:"code_type,omitempty"` - // name of the type to use, e.g. `text` - DbType string `protobuf:"bytes,3,opt,name=db_type,proto3" json:"db_type,omitempty"` - // True if the override should apply to a nullable database type - Nullable bool `protobuf:"varint,5,opt,name=nullable,proto3" json:"nullable,omitempty"` - // fully qualified name of the column, e.g. `accounts.id` - Column string `protobuf:"bytes,6,opt,name=column,proto3" json:"column,omitempty"` - Table *Identifier `protobuf:"bytes,7,opt,name=table,proto3" json:"table,omitempty"` - ColumnName string `protobuf:"bytes,8,opt,name=column_name,proto3" json:"column_name,omitempty"` - GoType *ParsedGoType `protobuf:"bytes,10,opt,name=go_type,json=goType,proto3" json:"go_type,omitempty"` - // True if the override should apply to a unsigned database type - Unsigned bool `protobuf:"varint,11,opt,name=unsigned,proto3" json:"unsigned,omitempty"` -} - -func (x *Override) Reset() { - *x = Override{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Override) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Override) ProtoMessage() {} - -func (x *Override) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_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 Override.ProtoReflect.Descriptor instead. -func (*Override) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{1} -} - -func (x *Override) GetCodeType() string { - if x != nil { - return x.CodeType - } - return "" -} - -func (x *Override) GetDbType() string { - if x != nil { - return x.DbType - } - return "" -} - -func (x *Override) GetNullable() bool { - if x != nil { - return x.Nullable - } - return false -} - -func (x *Override) GetColumn() string { - if x != nil { - return x.Column - } - return "" -} - -func (x *Override) GetTable() *Identifier { - if x != nil { - return x.Table - } - return nil -} - -func (x *Override) GetColumnName() string { - if x != nil { - return x.ColumnName - } - return "" -} - -func (x *Override) GetGoType() *ParsedGoType { - if x != nil { - return x.GoType - } - return nil -} - -func (x *Override) GetUnsigned() bool { - if x != nil { - return x.Unsigned - } - return false -} - -type ParsedGoType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ImportPath string `protobuf:"bytes,1,opt,name=import_path,json=importPath,proto3" json:"import_path,omitempty"` - Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"` - TypeName string `protobuf:"bytes,3,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` - BasicType bool `protobuf:"varint,4,opt,name=basic_type,json=basicType,proto3" json:"basic_type,omitempty"` - StructTags map[string]string `protobuf:"bytes,5,rep,name=struct_tags,json=structTags,proto3" json:"struct_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ParsedGoType) Reset() { - *x = ParsedGoType{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParsedGoType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParsedGoType) ProtoMessage() {} - -func (x *ParsedGoType) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_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 ParsedGoType.ProtoReflect.Descriptor instead. -func (*ParsedGoType) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{2} -} - -func (x *ParsedGoType) GetImportPath() string { - if x != nil { - return x.ImportPath - } - return "" -} - -func (x *ParsedGoType) GetPackage() string { - if x != nil { - return x.Package - } - return "" -} - -func (x *ParsedGoType) GetTypeName() string { - if x != nil { - return x.TypeName - } - return "" -} - -func (x *ParsedGoType) GetBasicType() bool { - if x != nil { - return x.BasicType - } - return false -} - -func (x *ParsedGoType) GetStructTags() map[string]string { - if x != nil { - return x.StructTags - } - return nil -} - type Settings struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Engine string `protobuf:"bytes,2,opt,name=engine,proto3" json:"engine,omitempty"` - Schema []string `protobuf:"bytes,3,rep,name=schema,proto3" json:"schema,omitempty"` - Queries []string `protobuf:"bytes,4,rep,name=queries,proto3" json:"queries,omitempty"` - 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"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Engine string `protobuf:"bytes,2,opt,name=engine,proto3" json:"engine,omitempty"` + Schema []string `protobuf:"bytes,3,rep,name=schema,proto3" json:"schema,omitempty"` + Queries []string `protobuf:"bytes,4,rep,name=queries,proto3" json:"queries,omitempty"` + Codegen *Codegen `protobuf:"bytes,12,opt,name=codegen,proto3" json:"codegen,omitempty"` } func (x *Settings) Reset() { *x = Settings{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[3] + mi := &file_plugin_codegen_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -292,7 +103,7 @@ func (x *Settings) String() string { func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[3] + mi := &file_plugin_codegen_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -305,7 +116,7 @@ func (x *Settings) ProtoReflect() protoreflect.Message { // Deprecated: Use Settings.ProtoReflect.Descriptor instead. func (*Settings) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{3} + return file_plugin_codegen_proto_rawDescGZIP(), []int{1} } func (x *Settings) GetVersion() string { @@ -336,20 +147,6 @@ func (x *Settings) GetQueries() []string { return nil } -func (x *Settings) GetRename() map[string]string { - if x != nil { - return x.Rename - } - return nil -} - -func (x *Settings) GetOverrides() []*Override { - if x != nil { - return x.Overrides - } - return nil -} - func (x *Settings) GetCodegen() *Codegen { if x != nil { return x.Codegen @@ -373,7 +170,7 @@ type Codegen struct { func (x *Codegen) Reset() { *x = Codegen{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[4] + mi := &file_plugin_codegen_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -386,7 +183,7 @@ func (x *Codegen) String() string { func (*Codegen) ProtoMessage() {} func (x *Codegen) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[4] + mi := &file_plugin_codegen_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -399,7 +196,7 @@ func (x *Codegen) ProtoReflect() protoreflect.Message { // Deprecated: Use Codegen.ProtoReflect.Descriptor instead. func (*Codegen) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{4} + return file_plugin_codegen_proto_rawDescGZIP(), []int{2} } func (x *Codegen) GetOut() string { @@ -458,7 +255,7 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[5] + mi := &file_plugin_codegen_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -471,7 +268,7 @@ func (x *Catalog) String() string { func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[5] + mi := &file_plugin_codegen_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -484,7 +281,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{5} + return file_plugin_codegen_proto_rawDescGZIP(), []int{3} } func (x *Catalog) GetComment() string { @@ -530,7 +327,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[6] + mi := &file_plugin_codegen_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -543,7 +340,7 @@ func (x *Schema) String() string { func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[6] + mi := &file_plugin_codegen_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -556,7 +353,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{6} + return file_plugin_codegen_proto_rawDescGZIP(), []int{4} } func (x *Schema) GetComment() string { @@ -606,7 +403,7 @@ type CompositeType struct { func (x *CompositeType) Reset() { *x = CompositeType{} 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) } @@ -619,7 +416,7 @@ func (x *CompositeType) String() string { func (*CompositeType) ProtoMessage() {} func (x *CompositeType) 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 { @@ -632,7 +429,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{7} + return file_plugin_codegen_proto_rawDescGZIP(), []int{5} } func (x *CompositeType) GetName() string { @@ -662,7 +459,7 @@ type Enum struct { func (x *Enum) Reset() { *x = Enum{} 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) } @@ -675,7 +472,7 @@ func (x *Enum) String() string { func (*Enum) ProtoMessage() {} func (x *Enum) 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 { @@ -688,7 +485,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{8} + return file_plugin_codegen_proto_rawDescGZIP(), []int{6} } func (x *Enum) GetName() string { @@ -725,7 +522,7 @@ type Table struct { func (x *Table) Reset() { *x = Table{} 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) } @@ -738,7 +535,7 @@ func (x *Table) String() string { func (*Table) ProtoMessage() {} func (x *Table) 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 { @@ -751,7 +548,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{9} + return file_plugin_codegen_proto_rawDescGZIP(), []int{7} } func (x *Table) GetRel() *Identifier { @@ -788,7 +585,7 @@ type Identifier struct { func (x *Identifier) Reset() { *x = Identifier{} 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) } @@ -801,7 +598,7 @@ func (x *Identifier) String() string { func (*Identifier) ProtoMessage() {} func (x *Identifier) 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 { @@ -814,7 +611,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{10} + return file_plugin_codegen_proto_rawDescGZIP(), []int{8} } func (x *Identifier) GetCatalog() string { @@ -865,7 +662,7 @@ type Column struct { func (x *Column) Reset() { *x = Column{} 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) } @@ -878,7 +675,7 @@ func (x *Column) String() string { func (*Column) ProtoMessage() {} func (x *Column) 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 { @@ -891,7 +688,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{11} + return file_plugin_codegen_proto_rawDescGZIP(), []int{9} } func (x *Column) GetName() string { @@ -1024,7 +821,7 @@ type Query struct { func (x *Query) Reset() { *x = Query{} 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) } @@ -1037,7 +834,7 @@ func (x *Query) String() string { func (*Query) ProtoMessage() {} func (x *Query) 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 { @@ -1050,7 +847,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{12} + return file_plugin_codegen_proto_rawDescGZIP(), []int{10} } func (x *Query) GetText() string { @@ -1121,7 +918,7 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} 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) } @@ -1134,7 +931,7 @@ func (x *Parameter) String() string { func (*Parameter) ProtoMessage() {} func (x *Parameter) 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 { @@ -1147,7 +944,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{13} + return file_plugin_codegen_proto_rawDescGZIP(), []int{11} } func (x *Parameter) GetNumber() int32 { @@ -1164,7 +961,7 @@ func (x *Parameter) GetColumn() *Column { return nil } -type CodeGenRequest struct { +type GenerateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1174,25 +971,26 @@ type CodeGenRequest struct { Queries []*Query `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"` SqlcVersion string `protobuf:"bytes,4,opt,name=sqlc_version,proto3" json:"sqlc_version,omitempty"` PluginOptions []byte `protobuf:"bytes,5,opt,name=plugin_options,proto3" json:"plugin_options,omitempty"` + GlobalOptions []byte `protobuf:"bytes,6,opt,name=global_options,proto3" json:"global_options,omitempty"` } -func (x *CodeGenRequest) Reset() { - *x = CodeGenRequest{} +func (x *GenerateRequest) Reset() { + *x = GenerateRequest{} 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) } } -func (x *CodeGenRequest) String() string { +func (x *GenerateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CodeGenRequest) ProtoMessage() {} +func (*GenerateRequest) ProtoMessage() {} -func (x *CodeGenRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[14] +func (x *GenerateRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_codegen_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1203,47 +1001,54 @@ func (x *CodeGenRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CodeGenRequest.ProtoReflect.Descriptor instead. -func (*CodeGenRequest) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{14} +// Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead. +func (*GenerateRequest) Descriptor() ([]byte, []int) { + return file_plugin_codegen_proto_rawDescGZIP(), []int{12} } -func (x *CodeGenRequest) GetSettings() *Settings { +func (x *GenerateRequest) GetSettings() *Settings { if x != nil { return x.Settings } return nil } -func (x *CodeGenRequest) GetCatalog() *Catalog { +func (x *GenerateRequest) GetCatalog() *Catalog { if x != nil { return x.Catalog } return nil } -func (x *CodeGenRequest) GetQueries() []*Query { +func (x *GenerateRequest) GetQueries() []*Query { if x != nil { return x.Queries } return nil } -func (x *CodeGenRequest) GetSqlcVersion() string { +func (x *GenerateRequest) GetSqlcVersion() string { if x != nil { return x.SqlcVersion } return "" } -func (x *CodeGenRequest) GetPluginOptions() []byte { +func (x *GenerateRequest) GetPluginOptions() []byte { if x != nil { return x.PluginOptions } return nil } -type CodeGenResponse struct { +func (x *GenerateRequest) GetGlobalOptions() []byte { + if x != nil { + return x.GlobalOptions + } + return nil +} + +type GenerateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1251,23 +1056,23 @@ type CodeGenResponse struct { Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` } -func (x *CodeGenResponse) Reset() { - *x = CodeGenResponse{} +func (x *GenerateResponse) Reset() { + *x = GenerateResponse{} 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) } } -func (x *CodeGenResponse) String() string { +func (x *GenerateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CodeGenResponse) ProtoMessage() {} +func (*GenerateResponse) ProtoMessage() {} -func (x *CodeGenResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[15] +func (x *GenerateResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_codegen_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1278,12 +1083,12 @@ func (x *CodeGenResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CodeGenResponse.ProtoReflect.Descriptor instead. -func (*CodeGenResponse) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{15} +// Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead. +func (*GenerateResponse) Descriptor() ([]byte, []int) { + return file_plugin_codegen_proto_rawDescGZIP(), []int{13} } -func (x *CodeGenResponse) GetFiles() []*File { +func (x *GenerateResponse) GetFiles() []*File { if x != nil { return x.Files } @@ -1301,7 +1106,7 @@ type Codegen_Process struct { func (x *Codegen_Process) Reset() { *x = Codegen_Process{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[18] + mi := &file_plugin_codegen_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1314,7 +1119,7 @@ func (x *Codegen_Process) String() string { func (*Codegen_Process) ProtoMessage() {} func (x *Codegen_Process) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[18] + mi := &file_plugin_codegen_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1327,7 +1132,7 @@ func (x *Codegen_Process) ProtoReflect() protoreflect.Message { // Deprecated: Use Codegen_Process.ProtoReflect.Descriptor instead. func (*Codegen_Process) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{4, 0} + return file_plugin_codegen_proto_rawDescGZIP(), []int{2, 0} } func (x *Codegen_Process) GetCmd() string { @@ -1349,7 +1154,7 @@ type Codegen_WASM struct { func (x *Codegen_WASM) Reset() { *x = Codegen_WASM{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[19] + mi := &file_plugin_codegen_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1362,7 +1167,7 @@ func (x *Codegen_WASM) String() string { func (*Codegen_WASM) ProtoMessage() {} func (x *Codegen_WASM) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[19] + mi := &file_plugin_codegen_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1375,7 +1180,7 @@ func (x *Codegen_WASM) ProtoReflect() protoreflect.Message { // Deprecated: Use Codegen_WASM.ProtoReflect.Descriptor instead. func (*Codegen_WASM) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{4, 1} + return file_plugin_codegen_proto_rawDescGZIP(), []int{2, 1} } func (x *Codegen_WASM) GetUrl() string { @@ -1400,202 +1205,166 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x93, 0x02, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x64, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, - 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, - 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, - 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 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, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x67, - 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x47, 0x6f, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x06, 0x67, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x8b, 0x02, 0x0a, - 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x47, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x61, 0x73, 0x69, 0x63, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x47, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x53, - 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, 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, - 0x09, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x76, - 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, 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, - 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, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xb7, 0x01, 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, 0x09, 0x52, 0x06, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x71, 0x75, 0x65, 0x72, 0x69, 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, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 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, 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, 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, - 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, + 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, 0x87, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 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, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x36, 0x0a, 0x10, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 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, 0x32, 0x4f, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 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 ( @@ -1610,60 +1379,53 @@ 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, 16) 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 - (*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 - (*Codegen_Process)(nil), // 18: plugin.Codegen.Process - (*Codegen_WASM)(nil), // 19: plugin.Codegen.WASM + (*File)(nil), // 0: plugin.File + (*Settings)(nil), // 1: plugin.Settings + (*Codegen)(nil), // 2: plugin.Codegen + (*Catalog)(nil), // 3: plugin.Catalog + (*Schema)(nil), // 4: plugin.Schema + (*CompositeType)(nil), // 5: plugin.CompositeType + (*Enum)(nil), // 6: plugin.Enum + (*Table)(nil), // 7: plugin.Table + (*Identifier)(nil), // 8: plugin.Identifier + (*Column)(nil), // 9: plugin.Column + (*Query)(nil), // 10: plugin.Query + (*Parameter)(nil), // 11: plugin.Parameter + (*GenerateRequest)(nil), // 12: plugin.GenerateRequest + (*GenerateResponse)(nil), // 13: plugin.GenerateResponse + (*Codegen_Process)(nil), // 14: plugin.Codegen.Process + (*Codegen_WASM)(nil), // 15: plugin.Codegen.WASM } var file_plugin_codegen_proto_depIdxs = []int32{ - 10, // 0: plugin.Override.table:type_name -> plugin.Identifier - 2, // 1: plugin.Override.go_type:type_name -> plugin.ParsedGoType - 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 - 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 + 2, // 0: plugin.Settings.codegen:type_name -> plugin.Codegen + 14, // 1: plugin.Codegen.process:type_name -> plugin.Codegen.Process + 15, // 2: plugin.Codegen.wasm:type_name -> plugin.Codegen.WASM + 4, // 3: plugin.Catalog.schemas:type_name -> plugin.Schema + 7, // 4: plugin.Schema.tables:type_name -> plugin.Table + 6, // 5: plugin.Schema.enums:type_name -> plugin.Enum + 5, // 6: plugin.Schema.composite_types:type_name -> plugin.CompositeType + 8, // 7: plugin.Table.rel:type_name -> plugin.Identifier + 9, // 8: plugin.Table.columns:type_name -> plugin.Column + 8, // 9: plugin.Column.table:type_name -> plugin.Identifier + 8, // 10: plugin.Column.type:type_name -> plugin.Identifier + 8, // 11: plugin.Column.embed_table:type_name -> plugin.Identifier + 9, // 12: plugin.Query.columns:type_name -> plugin.Column + 11, // 13: plugin.Query.params:type_name -> plugin.Parameter + 8, // 14: plugin.Query.insert_into_table:type_name -> plugin.Identifier + 9, // 15: plugin.Parameter.column:type_name -> plugin.Column + 1, // 16: plugin.GenerateRequest.settings:type_name -> plugin.Settings + 3, // 17: plugin.GenerateRequest.catalog:type_name -> plugin.Catalog + 10, // 18: plugin.GenerateRequest.queries:type_name -> plugin.Query + 0, // 19: plugin.GenerateResponse.files:type_name -> plugin.File + 12, // 20: plugin.CodegenService.Generate:input_type -> plugin.GenerateRequest + 13, // 21: plugin.CodegenService.Generate:output_type -> plugin.GenerateResponse + 21, // [21:22] is the sub-list for method output_type + 20, // [20:21] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_plugin_codegen_proto_init() } @@ -1685,7 +1447,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Override); i { + switch v := v.(*Settings); i { case 0: return &v.state case 1: @@ -1697,7 +1459,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParsedGoType); i { + switch v := v.(*Codegen); i { case 0: return &v.state case 1: @@ -1709,7 +1471,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Settings); i { + switch v := v.(*Catalog); i { case 0: return &v.state case 1: @@ -1721,7 +1483,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Codegen); i { + switch v := v.(*Schema); i { case 0: return &v.state case 1: @@ -1733,7 +1495,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Catalog); i { + switch v := v.(*CompositeType); i { case 0: return &v.state case 1: @@ -1745,7 +1507,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { + switch v := v.(*Enum); i { case 0: return &v.state case 1: @@ -1757,7 +1519,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompositeType); i { + switch v := v.(*Table); i { case 0: return &v.state case 1: @@ -1769,7 +1531,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Enum); i { + switch v := v.(*Identifier); i { case 0: return &v.state case 1: @@ -1781,7 +1543,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Table); i { + switch v := v.(*Column); i { case 0: return &v.state case 1: @@ -1793,7 +1555,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identifier); i { + switch v := v.(*Query); i { case 0: return &v.state case 1: @@ -1805,7 +1567,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Column); i { + switch v := v.(*Parameter); i { case 0: return &v.state case 1: @@ -1817,7 +1579,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Query); i { + switch v := v.(*GenerateRequest); i { case 0: return &v.state case 1: @@ -1829,7 +1591,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Parameter); i { + switch v := v.(*GenerateResponse); i { case 0: return &v.state case 1: @@ -1841,30 +1603,6 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CodeGenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_codegen_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CodeGenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - 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 @@ -1876,7 +1614,7 @@ func file_plugin_codegen_proto_init() { return nil } } - file_plugin_codegen_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_plugin_codegen_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Codegen_WASM); i { case 0: return &v.state @@ -1895,9 +1633,9 @@ func file_plugin_codegen_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 16, NumExtensions: 0, - NumServices: 0, + NumServices: 1, }, GoTypes: file_plugin_codegen_proto_goTypes, DependencyIndexes: file_plugin_codegen_proto_depIdxs, diff --git a/internal/plugin/codegen_grpc.pb.go b/internal/plugin/codegen_grpc.pb.go new file mode 100644 index 0000000000..30287ac457 --- /dev/null +++ b/internal/plugin/codegen_grpc.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: plugin/codegen.proto + +package plugin + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + CodegenService_Generate_FullMethodName = "/plugin.CodegenService/Generate" +) + +// CodegenServiceClient is the client API for CodegenService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CodegenServiceClient interface { + Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) +} + +type codegenServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCodegenServiceClient(cc grpc.ClientConnInterface) CodegenServiceClient { + return &codegenServiceClient{cc} +} + +func (c *codegenServiceClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) { + out := new(GenerateResponse) + err := c.cc.Invoke(ctx, CodegenService_Generate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CodegenServiceServer is the server API for CodegenService service. +// All implementations must embed UnimplementedCodegenServiceServer +// for forward compatibility +type CodegenServiceServer interface { + Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) + mustEmbedUnimplementedCodegenServiceServer() +} + +// UnimplementedCodegenServiceServer must be embedded to have forward compatible implementations. +type UnimplementedCodegenServiceServer struct { +} + +func (UnimplementedCodegenServiceServer) Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Generate not implemented") +} +func (UnimplementedCodegenServiceServer) mustEmbedUnimplementedCodegenServiceServer() {} + +// UnsafeCodegenServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CodegenServiceServer will +// result in compilation errors. +type UnsafeCodegenServiceServer interface { + mustEmbedUnimplementedCodegenServiceServer() +} + +func RegisterCodegenServiceServer(s grpc.ServiceRegistrar, srv CodegenServiceServer) { + s.RegisterService(&CodegenService_ServiceDesc, srv) +} + +func _CodegenService_Generate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CodegenServiceServer).Generate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CodegenService_Generate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CodegenServiceServer).Generate(ctx, req.(*GenerateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CodegenService_ServiceDesc is the grpc.ServiceDesc for CodegenService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CodegenService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "plugin.CodegenService", + HandlerType: (*CodegenServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Generate", + Handler: _CodegenService_Generate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "plugin/codegen.proto", +} diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go deleted file mode 100644 index 3ff0dc600f..0000000000 --- a/internal/plugin/codegen_vtproto.pb.go +++ /dev/null @@ -1,8219 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 -// source: plugin/codegen.proto - -package plugin - -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 *File) CloneVT() *File { - if m == nil { - return (*File)(nil) - } - r := &File{ - Name: m.Name, - } - if rhs := m.Contents; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Contents = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *File) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Override) CloneVT() *Override { - if m == nil { - return (*Override)(nil) - } - r := &Override{ - CodeType: m.CodeType, - DbType: m.DbType, - Nullable: m.Nullable, - Column: m.Column, - Table: m.Table.CloneVT(), - ColumnName: m.ColumnName, - GoType: m.GoType.CloneVT(), - Unsigned: m.Unsigned, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Override) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ParsedGoType) CloneVT() *ParsedGoType { - if m == nil { - return (*ParsedGoType)(nil) - } - r := &ParsedGoType{ - ImportPath: m.ImportPath, - Package: m.Package, - TypeName: m.TypeName, - BasicType: m.BasicType, - } - if rhs := m.StructTags; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.StructTags = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ParsedGoType) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Settings) CloneVT() *Settings { - if m == nil { - return (*Settings)(nil) - } - r := &Settings{ - Version: m.Version, - Engine: m.Engine, - Codegen: m.Codegen.CloneVT(), - } - if rhs := m.Schema; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Schema = tmpContainer - } - if rhs := m.Queries; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Queries = tmpContainer - } - if rhs := m.Rename; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.Rename = tmpContainer - } - if rhs := m.Overrides; rhs != nil { - tmpContainer := make([]*Override, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Overrides = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -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, - 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) - } - return r -} - -func (m *Codegen) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Catalog) CloneVT() *Catalog { - if m == nil { - return (*Catalog)(nil) - } - r := &Catalog{ - Comment: m.Comment, - DefaultSchema: m.DefaultSchema, - Name: m.Name, - } - if rhs := m.Schemas; rhs != nil { - tmpContainer := make([]*Schema, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Schemas = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Catalog) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Schema) CloneVT() *Schema { - if m == nil { - return (*Schema)(nil) - } - r := &Schema{ - Comment: m.Comment, - Name: m.Name, - } - if rhs := m.Tables; rhs != nil { - tmpContainer := make([]*Table, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Tables = tmpContainer - } - if rhs := m.Enums; rhs != nil { - tmpContainer := make([]*Enum, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Enums = tmpContainer - } - if rhs := m.CompositeTypes; rhs != nil { - tmpContainer := make([]*CompositeType, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.CompositeTypes = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Schema) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *CompositeType) CloneVT() *CompositeType { - if m == nil { - return (*CompositeType)(nil) - } - r := &CompositeType{ - Name: m.Name, - Comment: m.Comment, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CompositeType) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Enum) CloneVT() *Enum { - if m == nil { - return (*Enum)(nil) - } - r := &Enum{ - Name: m.Name, - Comment: m.Comment, - } - if rhs := m.Vals; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Vals = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Enum) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Table) CloneVT() *Table { - if m == nil { - return (*Table)(nil) - } - r := &Table{ - Rel: m.Rel.CloneVT(), - Comment: m.Comment, - } - if rhs := m.Columns; rhs != nil { - tmpContainer := make([]*Column, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Columns = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Table) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -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, - NotNull: m.NotNull, - IsArray: m.IsArray, - 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(), - IsSqlcSlice: m.IsSqlcSlice, - EmbedTable: m.EmbedTable.CloneVT(), - OriginalName: m.OriginalName, - Unsigned: m.Unsigned, - ArrayDims: m.ArrayDims, - } - 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 *Query) CloneVT() *Query { - if m == nil { - return (*Query)(nil) - } - r := &Query{ - Text: m.Text, - Name: m.Name, - Cmd: m.Cmd, - Filename: m.Filename, - InsertIntoTable: m.InsertIntoTable.CloneVT(), - } - 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 rhs := m.Comments; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Comments = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Query) 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 *CodeGenRequest) CloneVT() *CodeGenRequest { - if m == nil { - return (*CodeGenRequest)(nil) - } - r := &CodeGenRequest{ - Settings: m.Settings.CloneVT(), - Catalog: m.Catalog.CloneVT(), - SqlcVersion: m.SqlcVersion, - } - if rhs := m.Queries; rhs != nil { - tmpContainer := make([]*Query, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Queries = tmpContainer - } - if rhs := m.PluginOptions; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.PluginOptions = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CodeGenRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *CodeGenResponse) CloneVT() *CodeGenResponse { - if m == nil { - return (*CodeGenResponse)(nil) - } - r := &CodeGenResponse{} - if rhs := m.Files; rhs != nil { - tmpContainer := make([]*File, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Files = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CodeGenResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (this *File) EqualVT(that *File) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Name != that.Name { - return false - } - if string(this.Contents) != string(that.Contents) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *File) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*File) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Override) EqualVT(that *Override) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.CodeType != that.CodeType { - return false - } - if this.DbType != that.DbType { - return false - } - if this.Nullable != that.Nullable { - return false - } - if this.Column != that.Column { - return false - } - if !this.Table.EqualVT(that.Table) { - return false - } - if this.ColumnName != that.ColumnName { - return false - } - if !this.GoType.EqualVT(that.GoType) { - return false - } - if this.Unsigned != that.Unsigned { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Override) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Override) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ParsedGoType) EqualVT(that *ParsedGoType) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.ImportPath != that.ImportPath { - return false - } - if this.Package != that.Package { - return false - } - if this.TypeName != that.TypeName { - return false - } - if this.BasicType != that.BasicType { - return false - } - if len(this.StructTags) != len(that.StructTags) { - return false - } - for i, vx := range this.StructTags { - vy, ok := that.StructTags[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ParsedGoType) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ParsedGoType) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Settings) EqualVT(that *Settings) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Version != that.Version { - return false - } - if this.Engine != that.Engine { - return false - } - if len(this.Schema) != len(that.Schema) { - return false - } - for i, vx := range this.Schema { - vy := that.Schema[i] - if vx != vy { - return false - } - } - if len(this.Queries) != len(that.Queries) { - return false - } - for i, vx := range this.Queries { - vy := that.Queries[i] - if vx != vy { - return false - } - } - if len(this.Rename) != len(that.Rename) { - return false - } - for i, vx := range this.Rename { - vy, ok := that.Rename[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if len(this.Overrides) != len(that.Overrides) { - return false - } - for i, vx := range this.Overrides { - vy := that.Overrides[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Override{} - } - if q == nil { - q = &Override{} - } - if !p.EqualVT(q) { - return false - } - } - } - if !this.Codegen.EqualVT(that.Codegen) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Settings) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Settings) - if !ok { - return false - } - 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 - } else if this == nil || that == nil { - return false - } - if this.Out != that.Out { - return false - } - if this.Plugin != that.Plugin { - return false - } - 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) -} - -func (this *Codegen) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Codegen) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Catalog) EqualVT(that *Catalog) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Comment != that.Comment { - return false - } - if this.DefaultSchema != that.DefaultSchema { - return false - } - if this.Name != that.Name { - return false - } - if len(this.Schemas) != len(that.Schemas) { - return false - } - for i, vx := range this.Schemas { - vy := that.Schemas[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Schema{} - } - if q == nil { - q = &Schema{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Catalog) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Catalog) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Schema) EqualVT(that *Schema) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Comment != that.Comment { - return false - } - if this.Name != that.Name { - return false - } - if len(this.Tables) != len(that.Tables) { - return false - } - for i, vx := range this.Tables { - vy := that.Tables[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Table{} - } - if q == nil { - q = &Table{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.Enums) != len(that.Enums) { - return false - } - for i, vx := range this.Enums { - vy := that.Enums[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Enum{} - } - if q == nil { - q = &Enum{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.CompositeTypes) != len(that.CompositeTypes) { - return false - } - for i, vx := range this.CompositeTypes { - vy := that.CompositeTypes[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &CompositeType{} - } - if q == nil { - q = &CompositeType{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Schema) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Schema) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *CompositeType) EqualVT(that *CompositeType) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Name != that.Name { - return false - } - if this.Comment != that.Comment { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *CompositeType) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*CompositeType) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Enum) EqualVT(that *Enum) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Name != that.Name { - return false - } - if len(this.Vals) != len(that.Vals) { - return false - } - for i, vx := range this.Vals { - vy := that.Vals[i] - if vx != vy { - return false - } - } - if this.Comment != that.Comment { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Enum) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Enum) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Table) EqualVT(that *Table) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.Rel.EqualVT(that.Rel) { - 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 this.Comment != that.Comment { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Table) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Table) - if !ok { - return false - } - return this.EqualVT(that) -} -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.NotNull != that.NotNull { - return false - } - if this.IsArray != that.IsArray { - 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.IsSqlcSlice != that.IsSqlcSlice { - return false - } - if !this.EmbedTable.EqualVT(that.EmbedTable) { - return false - } - if this.OriginalName != that.OriginalName { - return false - } - if this.Unsigned != that.Unsigned { - return false - } - if this.ArrayDims != that.ArrayDims { - 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 *Query) EqualVT(that *Query) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Text != that.Text { - return false - } - if this.Name != that.Name { - return false - } - if this.Cmd != that.Cmd { - 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 - } - } - } - if len(this.Comments) != len(that.Comments) { - return false - } - for i, vx := range this.Comments { - vy := that.Comments[i] - if vx != vy { - return false - } - } - if this.Filename != that.Filename { - return false - } - if !this.InsertIntoTable.EqualVT(that.InsertIntoTable) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Query) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Query) - 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 *CodeGenRequest) EqualVT(that *CodeGenRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.Settings.EqualVT(that.Settings) { - return false - } - if !this.Catalog.EqualVT(that.Catalog) { - return false - } - if len(this.Queries) != len(that.Queries) { - return false - } - for i, vx := range this.Queries { - vy := that.Queries[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Query{} - } - if q == nil { - q = &Query{} - } - if !p.EqualVT(q) { - return false - } - } - } - if this.SqlcVersion != that.SqlcVersion { - return false - } - if string(this.PluginOptions) != string(that.PluginOptions) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *CodeGenRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*CodeGenRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *CodeGenResponse) EqualVT(that *CodeGenResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Files) != len(that.Files) { - return false - } - for i, vx := range this.Files { - vy := that.Files[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &File{} - } - if q == nil { - q = &File{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *CodeGenResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*CodeGenResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *File) 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 *File) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *File) 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.Contents) > 0 { - i -= len(m.Contents) - copy(dAtA[i:], m.Contents) - i = encodeVarint(dAtA, i, uint64(len(m.Contents))) - 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 *Override) 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 *Override) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Override) 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.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.GoType != nil { - size, err := m.GoType.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if len(m.ColumnName) > 0 { - i -= len(m.ColumnName) - copy(dAtA[i:], m.ColumnName) - i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) - i-- - dAtA[i] = 0x42 - } - 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] = 0x3a - } - if len(m.Column) > 0 { - i -= len(m.Column) - copy(dAtA[i:], m.Column) - i = encodeVarint(dAtA, i, uint64(len(m.Column))) - i-- - dAtA[i] = 0x32 - } - if m.Nullable { - i-- - if m.Nullable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.DbType) > 0 { - i -= len(m.DbType) - copy(dAtA[i:], m.DbType) - i = encodeVarint(dAtA, i, uint64(len(m.DbType))) - i-- - dAtA[i] = 0x1a - } - if len(m.CodeType) > 0 { - i -= len(m.CodeType) - copy(dAtA[i:], m.CodeType) - i = encodeVarint(dAtA, i, uint64(len(m.CodeType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ParsedGoType) 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 *ParsedGoType) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ParsedGoType) 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.StructTags) > 0 { - for k := range m.StructTags { - v := m.StructTags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.BasicType { - i-- - if m.BasicType { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.TypeName) > 0 { - i -= len(m.TypeName) - copy(dAtA[i:], m.TypeName) - i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) - i-- - dAtA[i] = 0x1a - } - 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] = 0x12 - } - if len(m.ImportPath) > 0 { - i -= len(m.ImportPath) - copy(dAtA[i:], m.ImportPath) - i = encodeVarint(dAtA, i, uint64(len(m.ImportPath))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Settings) 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 *Settings) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Settings) 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.Codegen != nil { - size, err := m.Codegen.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if len(m.Overrides) > 0 { - for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Overrides[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Rename) > 0 { - for k := range m.Rename { - v := m.Rename[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Queries[iNdEx]) - copy(dAtA[i:], m.Queries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Schema) > 0 { - for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Schema[iNdEx]) - copy(dAtA[i:], m.Schema[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) - i-- - dAtA[i] = 0x12 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - 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 - } - 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) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Codegen) 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.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) - 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) 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 *Catalog) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Catalog) 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.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.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) 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 *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 - } - 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].MarshalToSizedBufferVT(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].MarshalToSizedBufferVT(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].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 - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -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.ArrayDims != 0 { - i = encodeVarint(dAtA, i, uint64(m.ArrayDims)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - 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] = 0x7a - } - 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] = 0x72 - } - if m.IsSqlcSlice { - i-- - if m.IsSqlcSlice { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - 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] = 0x62 - } - 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] = 0x5a - } - 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] = 0x52 - } - 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] = 0x4a - } - if m.IsFuncCall { - i-- - if m.IsFuncCall { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.IsNamedParam { - i-- - if m.IsNamedParam { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.Length != 0 { - i = encodeVarint(dAtA, i, uint64(m.Length)) - i-- - dAtA[i] = 0x30 - } - 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] = 0x2a - } - if m.IsArray { - i-- - if m.IsArray { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.NotNull { - i-- - if m.NotNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - 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 *Query) 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 *Query) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Query) 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.InsertIntoTable != nil { - size, err := m.InsertIntoTable.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - 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] = 0x3a - } - if len(m.Comments) > 0 { - for iNdEx := len(m.Comments) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Comments[iNdEx]) - copy(dAtA[i:], m.Comments[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Comments[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - 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] = 0x2a - } - } - 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 - } - } - 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] = 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.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarint(dAtA, i, uint64(len(m.Text))) - 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 *CodeGenRequest) 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 *CodeGenRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CodeGenRequest) 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.PluginOptions) > 0 { - i -= len(m.PluginOptions) - copy(dAtA[i:], m.PluginOptions) - i = encodeVarint(dAtA, i, uint64(len(m.PluginOptions))) - i-- - dAtA[i] = 0x2a - } - if len(m.SqlcVersion) > 0 { - i -= len(m.SqlcVersion) - copy(dAtA[i:], m.SqlcVersion) - i = encodeVarint(dAtA, i, uint64(len(m.SqlcVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Queries[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Catalog != nil { - size, err := m.Catalog.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Settings != nil { - size, err := m.Settings.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 (m *CodeGenResponse) 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 *CodeGenResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CodeGenResponse) 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.Files) > 0 { - for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Files[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 *File) 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 *File) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *File) 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.Contents) > 0 { - i -= len(m.Contents) - copy(dAtA[i:], m.Contents) - i = encodeVarint(dAtA, i, uint64(len(m.Contents))) - 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 *Override) 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 *Override) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Override) 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.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.GoType != nil { - size, err := m.GoType.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if len(m.ColumnName) > 0 { - i -= len(m.ColumnName) - copy(dAtA[i:], m.ColumnName) - i = encodeVarint(dAtA, i, uint64(len(m.ColumnName))) - i-- - dAtA[i] = 0x42 - } - 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] = 0x3a - } - if len(m.Column) > 0 { - i -= len(m.Column) - copy(dAtA[i:], m.Column) - i = encodeVarint(dAtA, i, uint64(len(m.Column))) - i-- - dAtA[i] = 0x32 - } - if m.Nullable { - i-- - if m.Nullable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.DbType) > 0 { - i -= len(m.DbType) - copy(dAtA[i:], m.DbType) - i = encodeVarint(dAtA, i, uint64(len(m.DbType))) - i-- - dAtA[i] = 0x1a - } - if len(m.CodeType) > 0 { - i -= len(m.CodeType) - copy(dAtA[i:], m.CodeType) - i = encodeVarint(dAtA, i, uint64(len(m.CodeType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ParsedGoType) 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 *ParsedGoType) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ParsedGoType) 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.StructTags) > 0 { - for k := range m.StructTags { - v := m.StructTags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.BasicType { - i-- - if m.BasicType { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.TypeName) > 0 { - i -= len(m.TypeName) - copy(dAtA[i:], m.TypeName) - i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) - i-- - dAtA[i] = 0x1a - } - 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] = 0x12 - } - if len(m.ImportPath) > 0 { - i -= len(m.ImportPath) - copy(dAtA[i:], m.ImportPath) - i = encodeVarint(dAtA, i, uint64(len(m.ImportPath))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Settings) 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 *Settings) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Settings) 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.Codegen != nil { - size, err := m.Codegen.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if len(m.Overrides) > 0 { - for iNdEx := len(m.Overrides) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Overrides[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Rename) > 0 { - for k := range m.Rename { - v := m.Rename[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Queries[iNdEx]) - copy(dAtA[i:], m.Queries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Queries[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Schema) > 0 { - for iNdEx := len(m.Schema) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Schema[iNdEx]) - copy(dAtA[i:], m.Schema[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Schema[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Engine) > 0 { - i -= len(m.Engine) - copy(dAtA[i:], m.Engine) - i = encodeVarint(dAtA, i, uint64(len(m.Engine))) - i-- - dAtA[i] = 0x12 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Codegen_Process) 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 *Codegen_Process) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Codegen_Process) 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.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) 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 *Codegen_WASM) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Codegen_WASM) 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.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) 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 *Codegen) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Codegen) 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.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 m.Process != nil { - size, err := m.Process.MarshalToSizedBufferVTStrict(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) - 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 { - 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) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Table) 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.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] = 0x12 - } - } - if m.Rel != nil { - size, err := m.Rel.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) 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.ArrayDims != 0 { - i = encodeVarint(dAtA, i, uint64(m.ArrayDims)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.Unsigned { - i-- - if m.Unsigned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - 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] = 0x7a - } - 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] = 0x72 - } - if m.IsSqlcSlice { - i-- - if m.IsSqlcSlice { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - 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] = 0x62 - } - 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] = 0x5a - } - 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] = 0x52 - } - 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] = 0x4a - } - if m.IsFuncCall { - i-- - if m.IsFuncCall { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.IsNamedParam { - i-- - if m.IsNamedParam { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.Length != 0 { - i = encodeVarint(dAtA, i, uint64(m.Length)) - i-- - dAtA[i] = 0x30 - } - 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] = 0x2a - } - if m.IsArray { - i-- - if m.IsArray { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.NotNull { - i-- - if m.NotNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - 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 *Query) 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 *Query) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Query) 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.InsertIntoTable != nil { - size, err := m.InsertIntoTable.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - 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] = 0x3a - } - if len(m.Comments) > 0 { - for iNdEx := len(m.Comments) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Comments[iNdEx]) - copy(dAtA[i:], m.Comments[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Comments[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - 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] = 0x2a - } - } - 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] = 0x22 - } - } - 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] = 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.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarint(dAtA, i, uint64(len(m.Text))) - 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 *CodeGenRequest) 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 *CodeGenRequest) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *CodeGenRequest) 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.PluginOptions) > 0 { - i -= len(m.PluginOptions) - copy(dAtA[i:], m.PluginOptions) - i = encodeVarint(dAtA, i, uint64(len(m.PluginOptions))) - i-- - dAtA[i] = 0x2a - } - if len(m.SqlcVersion) > 0 { - i -= len(m.SqlcVersion) - copy(dAtA[i:], m.SqlcVersion) - i = encodeVarint(dAtA, i, uint64(len(m.SqlcVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Queries[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Catalog != nil { - size, err := m.Catalog.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Settings != nil { - size, err := m.Settings.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 *CodeGenResponse) 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 *CodeGenResponse) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *CodeGenResponse) 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.Files) > 0 { - for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Files[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 *File) 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.Contents) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Override) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CodeType) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.DbType) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Nullable { - n += 2 - } - l = len(m.Column) - 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.ColumnName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.GoType != nil { - l = m.GoType.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Unsigned { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *ParsedGoType) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ImportPath) - 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.TypeName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.BasicType { - n += 2 - } - if len(m.StructTags) > 0 { - for k, v := range m.StructTags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Settings) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Engine) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Schema) > 0 { - for _, s := range m.Schema { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Queries) > 0 { - for _, s := range m.Queries { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Rename) > 0 { - for k, v := range m.Rename { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.Overrides) > 0 { - for _, e := range m.Overrides { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if m.Codegen != nil { - l = m.Codegen.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - 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 - } - var l int - _ = l - l = len(m.Out) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Plugin) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Options) - 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 -} - -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) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.Tables) > 0 { - for _, e := range m.Tables { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if len(m.Enums) > 0 { - for _, e := range m.Enums { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if len(m.CompositeTypes) > 0 { - for _, e := range m.CompositeTypes { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *CompositeType) 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.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Enum) 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)) - } - if len(m.Vals) > 0 { - for _, s := range m.Vals { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Table) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Rel != nil { - l = m.Rel.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.Columns) > 0 { - for _, e := range m.Columns { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Comment) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -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)) - } - if m.NotNull { - n += 2 - } - if m.IsArray { - n += 2 - } - 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.IsSqlcSlice { - n += 2 - } - if m.EmbedTable != nil { - l = m.EmbedTable.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.OriginalName) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Unsigned { - n += 3 - } - if m.ArrayDims != 0 { - n += 2 + sov(uint64(m.ArrayDims)) - } - n += len(m.unknownFields) - return n -} - -func (m *Query) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Text) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Cmd) - if l > 0 { - n += 1 + l + sov(uint64(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)) - } - } - if len(m.Comments) > 0 { - for _, s := range m.Comments { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.Filename) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.InsertIntoTable != nil { - l = m.InsertIntoTable.SizeVT() - n += 1 + l + sov(uint64(l)) - } - 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 *CodeGenRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Settings != nil { - l = m.Settings.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Catalog != nil { - l = m.Catalog.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if len(m.Queries) > 0 { - for _, e := range m.Queries { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - l = len(m.SqlcVersion) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.PluginOptions) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *CodeGenResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - 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 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 iNdEx > l { - return io.ErrUnexpectedEOF - } - 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 - 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: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Codegen: 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) - } - 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.Out = 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) - } - 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.Options = append(m.Options[:0], dAtA[iNdEx:postIndex]...) - if m.Options == nil { - 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:]) - 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 *Catalog) 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: Catalog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Catalog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSchema", 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.DefaultSchema = 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 - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schemas", 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.Schemas = append(m.Schemas, &Schema{}) - if err := m.Schemas[len(m.Schemas)-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 (m *Schema) 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: Schema: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Schema: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 2: - 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 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tables", 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.Tables = append(m.Tables, &Table{}) - if err := m.Tables[len(m.Tables)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enums", 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.Enums = append(m.Enums, &Enum{}) - if err := m.Enums[len(m.Enums)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompositeTypes", 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.CompositeTypes = append(m.CompositeTypes, &CompositeType{}) - if err := m.CompositeTypes[len(m.CompositeTypes)-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 (m *CompositeType) 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: CompositeType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompositeType: 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 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 - 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 *Enum) 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: Enum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Enum: 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 Vals", 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.Vals = append(m.Vals, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - 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 - 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 *Table) 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: Table: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Table: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rel", 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.Rel == nil { - m.Rel = &Identifier{} - } - if err := m.Rel.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 3: - 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 - 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 *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 3: - 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 4: - 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 5: - 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 6: - 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 7: - 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 8: - 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 9: - 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 10: - 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 11: - 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 12: - 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 13: - 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) - case 14: - 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 15: - 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 16: - 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 17: - 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 - } - } - 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 *Query) 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: Query: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", 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.Text = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 3: - 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 - case 4: - 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 5: - 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 - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comments", 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.Comments = append(m.Comments, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", 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.Filename = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsertIntoTable", 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.InsertIntoTable == nil { - m.InsertIntoTable = &Identifier{} - } - if err := m.InsertIntoTable.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 *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 *CodeGenRequest) 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: CodeGenRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CodeGenRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Settings", 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.Settings == nil { - m.Settings = &Settings{} - } - if err := m.Settings.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Catalog", 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.Catalog == nil { - m.Catalog = &Catalog{} - } - if err := m.Catalog.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", 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.Queries = append(m.Queries, &Query{}) - if err := m.Queries[len(m.Queries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlcVersion", 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.SqlcVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginOptions", 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.PluginOptions = append(m.PluginOptions[:0], dAtA[iNdEx:postIndex]...) - if m.PluginOptions == nil { - m.PluginOptions = []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 *CodeGenResponse) 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: CodeGenResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CodeGenResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Files", 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.Files = append(m.Files, &File{}) - if err := m.Files[len(m.Files)-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/quickdb/mysql.go b/internal/quickdb/mysql.go new file mode 100644 index 0000000000..628b08c6bb --- /dev/null +++ b/internal/quickdb/mysql.go @@ -0,0 +1,16 @@ +package quickdb + +import ( + "fmt" + "net/url" +) + +// The database URI returned by the QuickDB service isn't understood by the +// go-mysql-driver +func MySQLReformatURI(original string) (string, error) { + u, err := url.Parse(original) + if err != nil { + return "", err + } + return fmt.Sprintf("%s@tcp(%s)%s?multiStatements=true&parseTime=true&tls=true", u.User, u.Host, u.Path), nil +} diff --git a/internal/quickdb/region.go b/internal/quickdb/region.go deleted file mode 100644 index 1900e33a14..0000000000 --- a/internal/quickdb/region.go +++ /dev/null @@ -1,19 +0,0 @@ -package quickdb - -import ( - "net/http" - "sync" -) - -var region string -var once sync.Once - -func GetClosestRegion() string { - once.Do(func() { - resp, err := http.Get("https://find-closest-db-region.sqlc.dev") - if err == nil { - region = resp.Header.Get("Region") - } - }) - return region -} diff --git a/internal/quickdb/v1/quickdb.pb.go b/internal/quickdb/v1/quickdb.pb.go index 34f4e1739c..690dfc16f1 100755 --- a/internal/quickdb/v1/quickdb.pb.go +++ b/internal/quickdb/v1/quickdb.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v3.21.7 -// source: proto/quickdb/v1/quickdb.proto +// protoc (unknown) +// source: v1/quickdb.proto -package v1 +package quickdbv1 import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,7 +34,7 @@ type CreateEphemeralDatabaseRequest struct { func (x *CreateEphemeralDatabaseRequest) Reset() { *x = CreateEphemeralDatabaseRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[0] + mi := &file_v1_quickdb_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -51,7 +47,7 @@ func (x *CreateEphemeralDatabaseRequest) String() string { func (*CreateEphemeralDatabaseRequest) ProtoMessage() {} func (x *CreateEphemeralDatabaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[0] + mi := &file_v1_quickdb_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64,7 +60,7 @@ func (x *CreateEphemeralDatabaseRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateEphemeralDatabaseRequest.ProtoReflect.Descriptor instead. func (*CreateEphemeralDatabaseRequest) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{0} + return file_v1_quickdb_proto_rawDescGZIP(), []int{0} } func (x *CreateEphemeralDatabaseRequest) GetRegion() string { @@ -107,7 +103,7 @@ type CreateEphemeralDatabaseResponse struct { func (x *CreateEphemeralDatabaseResponse) Reset() { *x = CreateEphemeralDatabaseResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[1] + mi := &file_v1_quickdb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -120,7 +116,7 @@ func (x *CreateEphemeralDatabaseResponse) String() string { func (*CreateEphemeralDatabaseResponse) ProtoMessage() {} func (x *CreateEphemeralDatabaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[1] + mi := &file_v1_quickdb_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -133,7 +129,7 @@ func (x *CreateEphemeralDatabaseResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateEphemeralDatabaseResponse.ProtoReflect.Descriptor instead. func (*CreateEphemeralDatabaseResponse) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{1} + return file_v1_quickdb_proto_rawDescGZIP(), []int{1} } func (x *CreateEphemeralDatabaseResponse) GetDatabaseId() string { @@ -161,7 +157,7 @@ type DropEphemeralDatabaseRequest struct { func (x *DropEphemeralDatabaseRequest) Reset() { *x = DropEphemeralDatabaseRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[2] + mi := &file_v1_quickdb_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -174,7 +170,7 @@ func (x *DropEphemeralDatabaseRequest) String() string { func (*DropEphemeralDatabaseRequest) ProtoMessage() {} func (x *DropEphemeralDatabaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[2] + mi := &file_v1_quickdb_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -187,7 +183,7 @@ func (x *DropEphemeralDatabaseRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DropEphemeralDatabaseRequest.ProtoReflect.Descriptor instead. func (*DropEphemeralDatabaseRequest) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{2} + return file_v1_quickdb_proto_rawDescGZIP(), []int{2} } func (x *DropEphemeralDatabaseRequest) GetDatabaseId() string { @@ -206,7 +202,7 @@ type DropEphemeralDatabaseResponse struct { func (x *DropEphemeralDatabaseResponse) Reset() { *x = DropEphemeralDatabaseResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[3] + mi := &file_v1_quickdb_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -219,7 +215,7 @@ func (x *DropEphemeralDatabaseResponse) String() string { func (*DropEphemeralDatabaseResponse) ProtoMessage() {} func (x *DropEphemeralDatabaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[3] + mi := &file_v1_quickdb_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -232,7 +228,7 @@ func (x *DropEphemeralDatabaseResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DropEphemeralDatabaseResponse.ProtoReflect.Descriptor instead. func (*DropEphemeralDatabaseResponse) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{3} + return file_v1_quickdb_proto_rawDescGZIP(), []int{3} } type File struct { @@ -247,7 +243,7 @@ type File struct { func (x *File) Reset() { *x = File{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[4] + mi := &file_v1_quickdb_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -260,7 +256,7 @@ func (x *File) String() string { func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[4] + mi := &file_v1_quickdb_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -273,7 +269,7 @@ func (x *File) ProtoReflect() protoreflect.Message { // Deprecated: Use File.ProtoReflect.Descriptor instead. func (*File) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{4} + return file_v1_quickdb_proto_rawDescGZIP(), []int{4} } func (x *File) GetName() string { @@ -290,20 +286,95 @@ func (x *File) GetContents() []byte { return nil } +type QuerySet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Schema []*File `protobuf:"bytes,2,rep,name=schema,proto3" json:"schema,omitempty"` + Queries []*File `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"` + CodegenRequest *File `protobuf:"bytes,4,opt,name=codegen_request,json=codegenRequest,proto3" json:"codegen_request,omitempty"` +} + +func (x *QuerySet) Reset() { + *x = QuerySet{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_quickdb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySet) ProtoMessage() {} + +func (x *QuerySet) ProtoReflect() protoreflect.Message { + mi := &file_v1_quickdb_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 QuerySet.ProtoReflect.Descriptor instead. +func (*QuerySet) Descriptor() ([]byte, []int) { + return file_v1_quickdb_proto_rawDescGZIP(), []int{5} +} + +func (x *QuerySet) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *QuerySet) GetSchema() []*File { + if x != nil { + return x.Schema + } + return nil +} + +func (x *QuerySet) GetQueries() []*File { + if x != nil { + return x.Queries + } + return nil +} + +func (x *QuerySet) GetCodegenRequest() *File { + if x != nil { + return x.CodegenRequest + } + return nil +} + type UploadArchiveRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SqlcVersion string `protobuf:"bytes,1,opt,name=sqlc_version,json=sqlcVersion,proto3" json:"sqlc_version,omitempty"` - Inputs []*File `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` - Outputs []*File `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"` + SqlcVersion string `protobuf:"bytes,1,opt,name=sqlc_version,json=sqlcVersion,proto3" json:"sqlc_version,omitempty"` + Inputs []*File `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` // deprecated + Outputs []*File `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"` // deprecated + Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + QuerySets []*QuerySet `protobuf:"bytes,5,rep,name=query_sets,json=querySets,proto3" json:"query_sets,omitempty"` + Config *File `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` + Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` } func (x *UploadArchiveRequest) Reset() { *x = UploadArchiveRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[5] + mi := &file_v1_quickdb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -316,7 +387,7 @@ func (x *UploadArchiveRequest) String() string { func (*UploadArchiveRequest) ProtoMessage() {} func (x *UploadArchiveRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[5] + mi := &file_v1_quickdb_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -329,7 +400,7 @@ func (x *UploadArchiveRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UploadArchiveRequest.ProtoReflect.Descriptor instead. func (*UploadArchiveRequest) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{5} + return file_v1_quickdb_proto_rawDescGZIP(), []int{6} } func (x *UploadArchiveRequest) GetSqlcVersion() string { @@ -353,6 +424,34 @@ func (x *UploadArchiveRequest) GetOutputs() []*File { return nil } +func (x *UploadArchiveRequest) GetAnnotations() map[string]string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *UploadArchiveRequest) GetQuerySets() []*QuerySet { + if x != nil { + return x.QuerySets + } + return nil +} + +func (x *UploadArchiveRequest) GetConfig() *File { + if x != nil { + return x.Config + } + return nil +} + +func (x *UploadArchiveRequest) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + type UploadArchiveResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -364,7 +463,7 @@ type UploadArchiveResponse struct { func (x *UploadArchiveResponse) Reset() { *x = UploadArchiveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[6] + mi := &file_v1_quickdb_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -377,7 +476,7 @@ func (x *UploadArchiveResponse) String() string { func (*UploadArchiveResponse) ProtoMessage() {} func (x *UploadArchiveResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_quickdb_v1_quickdb_proto_msgTypes[6] + mi := &file_v1_quickdb_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -390,7 +489,7 @@ func (x *UploadArchiveResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UploadArchiveResponse.ProtoReflect.Descriptor instead. func (*UploadArchiveResponse) Descriptor() ([]byte, []int) { - return file_proto_quickdb_v1_quickdb_proto_rawDescGZIP(), []int{6} + return file_v1_quickdb_proto_rawDescGZIP(), []int{7} } func (x *UploadArchiveResponse) GetChecksum() []byte { @@ -400,125 +499,484 @@ func (x *UploadArchiveResponse) GetChecksum() []byte { return nil } -var File_proto_quickdb_v1_quickdb_proto protoreflect.FileDescriptor - -var file_proto_quickdb_v1_quickdb_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2f, - 0x76, 0x31, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x22, 0x8d, 0x01, 0x0a, - 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, - 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x54, 0x0a, 0x1f, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, - 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x69, 0x22, 0x3f, 0x0a, 0x1c, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, - 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, - 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xaf, 0x01, 0x0a, - 0x14, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x71, 0x6c, - 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, - 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, - 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x33, - 0x0a, 0x15, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x32, 0xa1, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x12, 0x92, 0x01, - 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, - 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x3a, 0x2e, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, - 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, +type VerifyQuerySetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SqlcVersion string `protobuf:"bytes,1,opt,name=sqlc_version,json=sqlcVersion,proto3" json:"sqlc_version,omitempty"` + QuerySets []*QuerySet `protobuf:"bytes,2,rep,name=query_sets,json=querySets,proto3" json:"query_sets,omitempty"` + Config *File `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Against string `protobuf:"bytes,5,opt,name=against,proto3" json:"against,omitempty"` +} + +func (x *VerifyQuerySetsRequest) Reset() { + *x = VerifyQuerySetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_quickdb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerifyQuerySetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyQuerySetsRequest) ProtoMessage() {} + +func (x *VerifyQuerySetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_v1_quickdb_proto_msgTypes[8] + 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 VerifyQuerySetsRequest.ProtoReflect.Descriptor instead. +func (*VerifyQuerySetsRequest) Descriptor() ([]byte, []int) { + return file_v1_quickdb_proto_rawDescGZIP(), []int{8} +} + +func (x *VerifyQuerySetsRequest) GetSqlcVersion() string { + if x != nil { + return x.SqlcVersion + } + return "" +} + +func (x *VerifyQuerySetsRequest) GetQuerySets() []*QuerySet { + if x != nil { + return x.QuerySets + } + return nil +} + +func (x *VerifyQuerySetsRequest) GetConfig() *File { + if x != nil { + return x.Config + } + return nil +} + +func (x *VerifyQuerySetsRequest) GetAnnotations() map[string]string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *VerifyQuerySetsRequest) GetAgainst() string { + if x != nil { + return x.Against + } + return "" +} + +type VerifyQuerySetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Errored bool `protobuf:"varint,1,opt,name=errored,proto3" json:"errored,omitempty"` + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + Summary string `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"` +} + +func (x *VerifyQuerySetsResponse) Reset() { + *x = VerifyQuerySetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_quickdb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerifyQuerySetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyQuerySetsResponse) ProtoMessage() {} + +func (x *VerifyQuerySetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_v1_quickdb_proto_msgTypes[9] + 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 VerifyQuerySetsResponse.ProtoReflect.Descriptor instead. +func (*VerifyQuerySetsResponse) Descriptor() ([]byte, []int) { + return file_v1_quickdb_proto_rawDescGZIP(), []int{9} +} + +func (x *VerifyQuerySetsResponse) GetErrored() bool { + if x != nil { + return x.Errored + } + return false +} + +func (x *VerifyQuerySetsResponse) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + +func (x *VerifyQuerySetsResponse) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +type GetQuerySetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *GetQuerySetsRequest) Reset() { + *x = GetQuerySetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_quickdb_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuerySetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuerySetsRequest) ProtoMessage() {} + +func (x *GetQuerySetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_v1_quickdb_proto_msgTypes[10] + 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 GetQuerySetsRequest.ProtoReflect.Descriptor instead. +func (*GetQuerySetsRequest) Descriptor() ([]byte, []int) { + return file_v1_quickdb_proto_rawDescGZIP(), []int{10} +} + +func (x *GetQuerySetsRequest) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +type GetQuerySetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuerySets []*QuerySet `protobuf:"bytes,1,rep,name=query_sets,json=querySets,proto3" json:"query_sets,omitempty"` +} + +func (x *GetQuerySetsResponse) Reset() { + *x = GetQuerySetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_quickdb_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuerySetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuerySetsResponse) ProtoMessage() {} + +func (x *GetQuerySetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_v1_quickdb_proto_msgTypes[11] + 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 GetQuerySetsResponse.ProtoReflect.Descriptor instead. +func (*GetQuerySetsResponse) Descriptor() ([]byte, []int) { + return file_v1_quickdb_proto_rawDescGZIP(), []int{11} +} + +func (x *GetQuerySetsResponse) GetQuerySets() []*QuerySet { + if x != nil { + return x.QuerySets + } + return nil +} + +var File_v1_quickdb_proto protoreflect.FileDescriptor + +var file_v1_quickdb_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x22, 0x8d, + 0x01, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, + 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, + 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x54, + 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, + 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x72, 0x69, 0x22, 0x3f, 0x0a, 0x1c, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, + 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, - 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, - 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x15, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, - 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x38, 0x2e, 0x72, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xdf, + 0x01, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x38, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3a, 0x0a, 0x07, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, + 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x0e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xe7, 0x03, 0x0a, 0x14, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x71, 0x6c, + 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x71, 0x6c, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x06, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, - 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, - 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, - 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, - 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, + 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x06, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, + 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x12, 0x63, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, + 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, + 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x74, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, + 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x33, 0x0a, 0x15, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, + 0xfb, 0x02, 0x0a, 0x16, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x71, + 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x71, 0x6c, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, + 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x74, 0x73, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, - 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x46, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x43, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x74, 0x1a, 0x3e, 0x0a, + 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x65, 0x0a, + 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x22, 0x27, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, + 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x5b, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, + 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, + 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x52, + 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, 0x32, 0x90, 0x05, 0x0a, 0x05, 0x51, + 0x75, 0x69, 0x63, 0x6b, 0x12, 0x92, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, + 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x12, 0x3a, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, + 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x15, 0x44, 0x72, + 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x12, 0x38, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, + 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x45, + 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, + 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, + 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, + 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, + 0x73, 0x12, 0x32, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, + 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, + 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, + 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x01, + 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, + 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x2e, 0x76, 0x31, + 0x42, 0x0c, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2e, 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, 0x76, 0x31, 0x3b, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x76, 0x31, + 0xa2, 0x02, 0x04, 0x52, 0x53, 0x44, 0x51, 0xaa, 0x02, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x2e, 0x53, 0x71, 0x6c, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x64, + 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5c, 0x53, 0x71, + 0x6c, 0x63, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x26, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5c, 0x53, 0x71, 0x6c, 0x63, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x52, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x3a, 0x3a, 0x53, 0x71, 0x6c, 0x63, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, + 0x51, 0x75, 0x69, 0x63, 0x6b, 0x64, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( - file_proto_quickdb_v1_quickdb_proto_rawDescOnce sync.Once - file_proto_quickdb_v1_quickdb_proto_rawDescData = file_proto_quickdb_v1_quickdb_proto_rawDesc + file_v1_quickdb_proto_rawDescOnce sync.Once + file_v1_quickdb_proto_rawDescData = file_v1_quickdb_proto_rawDesc ) -func file_proto_quickdb_v1_quickdb_proto_rawDescGZIP() []byte { - file_proto_quickdb_v1_quickdb_proto_rawDescOnce.Do(func() { - file_proto_quickdb_v1_quickdb_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_quickdb_v1_quickdb_proto_rawDescData) +func file_v1_quickdb_proto_rawDescGZIP() []byte { + file_v1_quickdb_proto_rawDescOnce.Do(func() { + file_v1_quickdb_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_quickdb_proto_rawDescData) }) - return file_proto_quickdb_v1_quickdb_proto_rawDescData + return file_v1_quickdb_proto_rawDescData } -var file_proto_quickdb_v1_quickdb_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_proto_quickdb_v1_quickdb_proto_goTypes = []interface{}{ +var file_v1_quickdb_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_v1_quickdb_proto_goTypes = []interface{}{ (*CreateEphemeralDatabaseRequest)(nil), // 0: remote.sqlc.dev.quickdb.v1.CreateEphemeralDatabaseRequest (*CreateEphemeralDatabaseResponse)(nil), // 1: remote.sqlc.dev.quickdb.v1.CreateEphemeralDatabaseResponse (*DropEphemeralDatabaseRequest)(nil), // 2: remote.sqlc.dev.quickdb.v1.DropEphemeralDatabaseRequest (*DropEphemeralDatabaseResponse)(nil), // 3: remote.sqlc.dev.quickdb.v1.DropEphemeralDatabaseResponse (*File)(nil), // 4: remote.sqlc.dev.quickdb.v1.File - (*UploadArchiveRequest)(nil), // 5: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest - (*UploadArchiveResponse)(nil), // 6: remote.sqlc.dev.quickdb.v1.UploadArchiveResponse -} -var file_proto_quickdb_v1_quickdb_proto_depIdxs = []int32{ - 4, // 0: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.inputs:type_name -> remote.sqlc.dev.quickdb.v1.File - 4, // 1: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.outputs:type_name -> remote.sqlc.dev.quickdb.v1.File - 0, // 2: remote.sqlc.dev.quickdb.v1.Quick.CreateEphemeralDatabase:input_type -> remote.sqlc.dev.quickdb.v1.CreateEphemeralDatabaseRequest - 2, // 3: remote.sqlc.dev.quickdb.v1.Quick.DropEphemeralDatabase:input_type -> remote.sqlc.dev.quickdb.v1.DropEphemeralDatabaseRequest - 5, // 4: remote.sqlc.dev.quickdb.v1.Quick.UploadArchive:input_type -> remote.sqlc.dev.quickdb.v1.UploadArchiveRequest - 1, // 5: remote.sqlc.dev.quickdb.v1.Quick.CreateEphemeralDatabase:output_type -> remote.sqlc.dev.quickdb.v1.CreateEphemeralDatabaseResponse - 3, // 6: remote.sqlc.dev.quickdb.v1.Quick.DropEphemeralDatabase:output_type -> remote.sqlc.dev.quickdb.v1.DropEphemeralDatabaseResponse - 6, // 7: remote.sqlc.dev.quickdb.v1.Quick.UploadArchive:output_type -> remote.sqlc.dev.quickdb.v1.UploadArchiveResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_proto_quickdb_v1_quickdb_proto_init() } -func file_proto_quickdb_v1_quickdb_proto_init() { - if File_proto_quickdb_v1_quickdb_proto != nil { + (*QuerySet)(nil), // 5: remote.sqlc.dev.quickdb.v1.QuerySet + (*UploadArchiveRequest)(nil), // 6: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest + (*UploadArchiveResponse)(nil), // 7: remote.sqlc.dev.quickdb.v1.UploadArchiveResponse + (*VerifyQuerySetsRequest)(nil), // 8: remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest + (*VerifyQuerySetsResponse)(nil), // 9: remote.sqlc.dev.quickdb.v1.VerifyQuerySetsResponse + (*GetQuerySetsRequest)(nil), // 10: remote.sqlc.dev.quickdb.v1.GetQuerySetsRequest + (*GetQuerySetsResponse)(nil), // 11: remote.sqlc.dev.quickdb.v1.GetQuerySetsResponse + nil, // 12: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.AnnotationsEntry + nil, // 13: remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest.AnnotationsEntry +} +var file_v1_quickdb_proto_depIdxs = []int32{ + 4, // 0: remote.sqlc.dev.quickdb.v1.QuerySet.schema:type_name -> remote.sqlc.dev.quickdb.v1.File + 4, // 1: remote.sqlc.dev.quickdb.v1.QuerySet.queries:type_name -> remote.sqlc.dev.quickdb.v1.File + 4, // 2: remote.sqlc.dev.quickdb.v1.QuerySet.codegen_request:type_name -> remote.sqlc.dev.quickdb.v1.File + 4, // 3: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.inputs:type_name -> remote.sqlc.dev.quickdb.v1.File + 4, // 4: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.outputs:type_name -> remote.sqlc.dev.quickdb.v1.File + 12, // 5: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.annotations:type_name -> remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.AnnotationsEntry + 5, // 6: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.query_sets:type_name -> remote.sqlc.dev.quickdb.v1.QuerySet + 4, // 7: remote.sqlc.dev.quickdb.v1.UploadArchiveRequest.config:type_name -> remote.sqlc.dev.quickdb.v1.File + 5, // 8: remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest.query_sets:type_name -> remote.sqlc.dev.quickdb.v1.QuerySet + 4, // 9: remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest.config:type_name -> remote.sqlc.dev.quickdb.v1.File + 13, // 10: remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest.annotations:type_name -> remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest.AnnotationsEntry + 5, // 11: remote.sqlc.dev.quickdb.v1.GetQuerySetsResponse.query_sets:type_name -> remote.sqlc.dev.quickdb.v1.QuerySet + 0, // 12: remote.sqlc.dev.quickdb.v1.Quick.CreateEphemeralDatabase:input_type -> remote.sqlc.dev.quickdb.v1.CreateEphemeralDatabaseRequest + 2, // 13: remote.sqlc.dev.quickdb.v1.Quick.DropEphemeralDatabase:input_type -> remote.sqlc.dev.quickdb.v1.DropEphemeralDatabaseRequest + 6, // 14: remote.sqlc.dev.quickdb.v1.Quick.UploadArchive:input_type -> remote.sqlc.dev.quickdb.v1.UploadArchiveRequest + 8, // 15: remote.sqlc.dev.quickdb.v1.Quick.VerifyQuerySets:input_type -> remote.sqlc.dev.quickdb.v1.VerifyQuerySetsRequest + 10, // 16: remote.sqlc.dev.quickdb.v1.Quick.GetQuerySets:input_type -> remote.sqlc.dev.quickdb.v1.GetQuerySetsRequest + 1, // 17: remote.sqlc.dev.quickdb.v1.Quick.CreateEphemeralDatabase:output_type -> remote.sqlc.dev.quickdb.v1.CreateEphemeralDatabaseResponse + 3, // 18: remote.sqlc.dev.quickdb.v1.Quick.DropEphemeralDatabase:output_type -> remote.sqlc.dev.quickdb.v1.DropEphemeralDatabaseResponse + 7, // 19: remote.sqlc.dev.quickdb.v1.Quick.UploadArchive:output_type -> remote.sqlc.dev.quickdb.v1.UploadArchiveResponse + 9, // 20: remote.sqlc.dev.quickdb.v1.Quick.VerifyQuerySets:output_type -> remote.sqlc.dev.quickdb.v1.VerifyQuerySetsResponse + 11, // 21: remote.sqlc.dev.quickdb.v1.Quick.GetQuerySets:output_type -> remote.sqlc.dev.quickdb.v1.GetQuerySetsResponse + 17, // [17:22] is the sub-list for method output_type + 12, // [12:17] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_v1_quickdb_proto_init() } +func file_v1_quickdb_proto_init() { + if File_v1_quickdb_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_proto_quickdb_v1_quickdb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateEphemeralDatabaseRequest); i { case 0: return &v.state @@ -530,7 +988,7 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } - file_proto_quickdb_v1_quickdb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateEphemeralDatabaseResponse); i { case 0: return &v.state @@ -542,7 +1000,7 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } - file_proto_quickdb_v1_quickdb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DropEphemeralDatabaseRequest); i { case 0: return &v.state @@ -554,7 +1012,7 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } - file_proto_quickdb_v1_quickdb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DropEphemeralDatabaseResponse); i { case 0: return &v.state @@ -566,7 +1024,7 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } - file_proto_quickdb_v1_quickdb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*File); i { case 0: return &v.state @@ -578,7 +1036,19 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } - file_proto_quickdb_v1_quickdb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_quickdb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UploadArchiveRequest); i { case 0: return &v.state @@ -590,7 +1060,7 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } - file_proto_quickdb_v1_quickdb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_v1_quickdb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UploadArchiveResponse); i { case 0: return &v.state @@ -602,175 +1072,71 @@ func file_proto_quickdb_v1_quickdb_proto_init() { return nil } } + file_v1_quickdb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VerifyQuerySetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_quickdb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VerifyQuerySetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_quickdb_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuerySetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_quickdb_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuerySetsResponse); 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_proto_quickdb_v1_quickdb_proto_rawDesc, + RawDescriptor: file_v1_quickdb_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_proto_quickdb_v1_quickdb_proto_goTypes, - DependencyIndexes: file_proto_quickdb_v1_quickdb_proto_depIdxs, - MessageInfos: file_proto_quickdb_v1_quickdb_proto_msgTypes, + GoTypes: file_v1_quickdb_proto_goTypes, + DependencyIndexes: file_v1_quickdb_proto_depIdxs, + MessageInfos: file_v1_quickdb_proto_msgTypes, }.Build() - File_proto_quickdb_v1_quickdb_proto = out.File - file_proto_quickdb_v1_quickdb_proto_rawDesc = nil - file_proto_quickdb_v1_quickdb_proto_goTypes = nil - file_proto_quickdb_v1_quickdb_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// QuickClient is the client API for Quick service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QuickClient interface { - CreateEphemeralDatabase(ctx context.Context, in *CreateEphemeralDatabaseRequest, opts ...grpc.CallOption) (*CreateEphemeralDatabaseResponse, error) - DropEphemeralDatabase(ctx context.Context, in *DropEphemeralDatabaseRequest, opts ...grpc.CallOption) (*DropEphemeralDatabaseResponse, error) - UploadArchive(ctx context.Context, in *UploadArchiveRequest, opts ...grpc.CallOption) (*UploadArchiveResponse, error) -} - -type quickClient struct { - cc grpc.ClientConnInterface -} - -func NewQuickClient(cc grpc.ClientConnInterface) QuickClient { - return &quickClient{cc} -} - -func (c *quickClient) CreateEphemeralDatabase(ctx context.Context, in *CreateEphemeralDatabaseRequest, opts ...grpc.CallOption) (*CreateEphemeralDatabaseResponse, error) { - out := new(CreateEphemeralDatabaseResponse) - err := c.cc.Invoke(ctx, "/remote.sqlc.dev.quickdb.v1.Quick/CreateEphemeralDatabase", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *quickClient) DropEphemeralDatabase(ctx context.Context, in *DropEphemeralDatabaseRequest, opts ...grpc.CallOption) (*DropEphemeralDatabaseResponse, error) { - out := new(DropEphemeralDatabaseResponse) - err := c.cc.Invoke(ctx, "/remote.sqlc.dev.quickdb.v1.Quick/DropEphemeralDatabase", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *quickClient) UploadArchive(ctx context.Context, in *UploadArchiveRequest, opts ...grpc.CallOption) (*UploadArchiveResponse, error) { - out := new(UploadArchiveResponse) - err := c.cc.Invoke(ctx, "/remote.sqlc.dev.quickdb.v1.Quick/UploadArchive", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QuickServer is the server API for Quick service. -type QuickServer interface { - CreateEphemeralDatabase(context.Context, *CreateEphemeralDatabaseRequest) (*CreateEphemeralDatabaseResponse, error) - DropEphemeralDatabase(context.Context, *DropEphemeralDatabaseRequest) (*DropEphemeralDatabaseResponse, error) - UploadArchive(context.Context, *UploadArchiveRequest) (*UploadArchiveResponse, error) -} - -// UnimplementedQuickServer can be embedded to have forward compatible implementations. -type UnimplementedQuickServer struct { -} - -func (*UnimplementedQuickServer) CreateEphemeralDatabase(context.Context, *CreateEphemeralDatabaseRequest) (*CreateEphemeralDatabaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateEphemeralDatabase not implemented") -} -func (*UnimplementedQuickServer) DropEphemeralDatabase(context.Context, *DropEphemeralDatabaseRequest) (*DropEphemeralDatabaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DropEphemeralDatabase not implemented") -} -func (*UnimplementedQuickServer) UploadArchive(context.Context, *UploadArchiveRequest) (*UploadArchiveResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadArchive not implemented") -} - -func RegisterQuickServer(s *grpc.Server, srv QuickServer) { - s.RegisterService(&_Quick_serviceDesc, srv) -} - -func _Quick_CreateEphemeralDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateEphemeralDatabaseRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuickServer).CreateEphemeralDatabase(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/remote.sqlc.dev.quickdb.v1.Quick/CreateEphemeralDatabase", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuickServer).CreateEphemeralDatabase(ctx, req.(*CreateEphemeralDatabaseRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Quick_DropEphemeralDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DropEphemeralDatabaseRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuickServer).DropEphemeralDatabase(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/remote.sqlc.dev.quickdb.v1.Quick/DropEphemeralDatabase", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuickServer).DropEphemeralDatabase(ctx, req.(*DropEphemeralDatabaseRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Quick_UploadArchive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UploadArchiveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuickServer).UploadArchive(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/remote.sqlc.dev.quickdb.v1.Quick/UploadArchive", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuickServer).UploadArchive(ctx, req.(*UploadArchiveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Quick_serviceDesc = grpc.ServiceDesc{ - ServiceName: "remote.sqlc.dev.quickdb.v1.Quick", - HandlerType: (*QuickServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateEphemeralDatabase", - Handler: _Quick_CreateEphemeralDatabase_Handler, - }, - { - MethodName: "DropEphemeralDatabase", - Handler: _Quick_DropEphemeralDatabase_Handler, - }, - { - MethodName: "UploadArchive", - Handler: _Quick_UploadArchive_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/quickdb/v1/quickdb.proto", + File_v1_quickdb_proto = out.File + file_v1_quickdb_proto_rawDesc = nil + file_v1_quickdb_proto_goTypes = nil + file_v1_quickdb_proto_depIdxs = nil } diff --git a/internal/quickdb/v1/quickdb_grpc.pb.go b/internal/quickdb/v1/quickdb_grpc.pb.go new file mode 100644 index 0000000000..f8f4a131fc --- /dev/null +++ b/internal/quickdb/v1/quickdb_grpc.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: v1/quickdb.proto + +package quickdbv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Quick_CreateEphemeralDatabase_FullMethodName = "/remote.sqlc.dev.quickdb.v1.Quick/CreateEphemeralDatabase" + Quick_DropEphemeralDatabase_FullMethodName = "/remote.sqlc.dev.quickdb.v1.Quick/DropEphemeralDatabase" + Quick_UploadArchive_FullMethodName = "/remote.sqlc.dev.quickdb.v1.Quick/UploadArchive" + Quick_VerifyQuerySets_FullMethodName = "/remote.sqlc.dev.quickdb.v1.Quick/VerifyQuerySets" + Quick_GetQuerySets_FullMethodName = "/remote.sqlc.dev.quickdb.v1.Quick/GetQuerySets" +) + +// QuickClient is the client API for Quick service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QuickClient interface { + CreateEphemeralDatabase(ctx context.Context, in *CreateEphemeralDatabaseRequest, opts ...grpc.CallOption) (*CreateEphemeralDatabaseResponse, error) + DropEphemeralDatabase(ctx context.Context, in *DropEphemeralDatabaseRequest, opts ...grpc.CallOption) (*DropEphemeralDatabaseResponse, error) + UploadArchive(ctx context.Context, in *UploadArchiveRequest, opts ...grpc.CallOption) (*UploadArchiveResponse, error) + VerifyQuerySets(ctx context.Context, in *VerifyQuerySetsRequest, opts ...grpc.CallOption) (*VerifyQuerySetsResponse, error) + GetQuerySets(ctx context.Context, in *GetQuerySetsRequest, opts ...grpc.CallOption) (*GetQuerySetsResponse, error) +} + +type quickClient struct { + cc grpc.ClientConnInterface +} + +func NewQuickClient(cc grpc.ClientConnInterface) QuickClient { + return &quickClient{cc} +} + +func (c *quickClient) CreateEphemeralDatabase(ctx context.Context, in *CreateEphemeralDatabaseRequest, opts ...grpc.CallOption) (*CreateEphemeralDatabaseResponse, error) { + out := new(CreateEphemeralDatabaseResponse) + err := c.cc.Invoke(ctx, Quick_CreateEphemeralDatabase_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quickClient) DropEphemeralDatabase(ctx context.Context, in *DropEphemeralDatabaseRequest, opts ...grpc.CallOption) (*DropEphemeralDatabaseResponse, error) { + out := new(DropEphemeralDatabaseResponse) + err := c.cc.Invoke(ctx, Quick_DropEphemeralDatabase_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quickClient) UploadArchive(ctx context.Context, in *UploadArchiveRequest, opts ...grpc.CallOption) (*UploadArchiveResponse, error) { + out := new(UploadArchiveResponse) + err := c.cc.Invoke(ctx, Quick_UploadArchive_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quickClient) VerifyQuerySets(ctx context.Context, in *VerifyQuerySetsRequest, opts ...grpc.CallOption) (*VerifyQuerySetsResponse, error) { + out := new(VerifyQuerySetsResponse) + err := c.cc.Invoke(ctx, Quick_VerifyQuerySets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quickClient) GetQuerySets(ctx context.Context, in *GetQuerySetsRequest, opts ...grpc.CallOption) (*GetQuerySetsResponse, error) { + out := new(GetQuerySetsResponse) + err := c.cc.Invoke(ctx, Quick_GetQuerySets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QuickServer is the server API for Quick service. +// All implementations must embed UnimplementedQuickServer +// for forward compatibility +type QuickServer interface { + CreateEphemeralDatabase(context.Context, *CreateEphemeralDatabaseRequest) (*CreateEphemeralDatabaseResponse, error) + DropEphemeralDatabase(context.Context, *DropEphemeralDatabaseRequest) (*DropEphemeralDatabaseResponse, error) + UploadArchive(context.Context, *UploadArchiveRequest) (*UploadArchiveResponse, error) + VerifyQuerySets(context.Context, *VerifyQuerySetsRequest) (*VerifyQuerySetsResponse, error) + GetQuerySets(context.Context, *GetQuerySetsRequest) (*GetQuerySetsResponse, error) + mustEmbedUnimplementedQuickServer() +} + +// UnimplementedQuickServer must be embedded to have forward compatible implementations. +type UnimplementedQuickServer struct { +} + +func (UnimplementedQuickServer) CreateEphemeralDatabase(context.Context, *CreateEphemeralDatabaseRequest) (*CreateEphemeralDatabaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEphemeralDatabase not implemented") +} +func (UnimplementedQuickServer) DropEphemeralDatabase(context.Context, *DropEphemeralDatabaseRequest) (*DropEphemeralDatabaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DropEphemeralDatabase not implemented") +} +func (UnimplementedQuickServer) UploadArchive(context.Context, *UploadArchiveRequest) (*UploadArchiveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadArchive not implemented") +} +func (UnimplementedQuickServer) VerifyQuerySets(context.Context, *VerifyQuerySetsRequest) (*VerifyQuerySetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyQuerySets not implemented") +} +func (UnimplementedQuickServer) GetQuerySets(context.Context, *GetQuerySetsRequest) (*GetQuerySetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQuerySets not implemented") +} +func (UnimplementedQuickServer) mustEmbedUnimplementedQuickServer() {} + +// UnsafeQuickServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QuickServer will +// result in compilation errors. +type UnsafeQuickServer interface { + mustEmbedUnimplementedQuickServer() +} + +func RegisterQuickServer(s grpc.ServiceRegistrar, srv QuickServer) { + s.RegisterService(&Quick_ServiceDesc, srv) +} + +func _Quick_CreateEphemeralDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEphemeralDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuickServer).CreateEphemeralDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Quick_CreateEphemeralDatabase_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuickServer).CreateEphemeralDatabase(ctx, req.(*CreateEphemeralDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Quick_DropEphemeralDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DropEphemeralDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuickServer).DropEphemeralDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Quick_DropEphemeralDatabase_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuickServer).DropEphemeralDatabase(ctx, req.(*DropEphemeralDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Quick_UploadArchive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UploadArchiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuickServer).UploadArchive(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Quick_UploadArchive_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuickServer).UploadArchive(ctx, req.(*UploadArchiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Quick_VerifyQuerySets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyQuerySetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuickServer).VerifyQuerySets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Quick_VerifyQuerySets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuickServer).VerifyQuerySets(ctx, req.(*VerifyQuerySetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Quick_GetQuerySets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQuerySetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuickServer).GetQuerySets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Quick_GetQuerySets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuickServer).GetQuerySets(ctx, req.(*GetQuerySetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Quick_ServiceDesc is the grpc.ServiceDesc for Quick service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Quick_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "remote.sqlc.dev.quickdb.v1.Quick", + HandlerType: (*QuickServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateEphemeralDatabase", + Handler: _Quick_CreateEphemeralDatabase_Handler, + }, + { + MethodName: "DropEphemeralDatabase", + Handler: _Quick_DropEphemeralDatabase_Handler, + }, + { + MethodName: "UploadArchive", + Handler: _Quick_UploadArchive_Handler, + }, + { + MethodName: "VerifyQuerySets", + Handler: _Quick_VerifyQuerySets_Handler, + }, + { + MethodName: "GetQuerySets", + Handler: _Quick_GetQuerySets_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "v1/quickdb.proto", +} diff --git a/internal/sql/ast/aggref.go b/internal/sql/ast/aggref.go index c4fa9af7e5..6642f4d9e3 100644 --- a/internal/sql/ast/aggref.go +++ b/internal/sql/ast/aggref.go @@ -6,7 +6,6 @@ type Aggref struct { Aggtype Oid Aggcollid Oid Inputcollid Oid - Aggtranstype Oid Aggargtypes *List Aggdirectargs *List Args *List diff --git a/internal/sql/ast/grant_role_stmt.go b/internal/sql/ast/grant_role_stmt.go index 5d785efa7e..5e0b2a8e87 100644 --- a/internal/sql/ast/grant_role_stmt.go +++ b/internal/sql/ast/grant_role_stmt.go @@ -4,7 +4,6 @@ type GrantRoleStmt struct { GrantedRoles *List GranteeRoles *List IsGrant bool - AdminOpt bool Grantor *RoleSpec Behavior DropBehavior } diff --git a/internal/sql/ast/index_stmt.go b/internal/sql/ast/index_stmt.go index c0f12bdb68..fe0f03593c 100644 --- a/internal/sql/ast/index_stmt.go +++ b/internal/sql/ast/index_stmt.go @@ -11,7 +11,6 @@ type IndexStmt struct { ExcludeOpNames *List Idxcomment *string IndexOid Oid - OldNode Oid Unique bool Primary bool Isconstraint bool diff --git a/internal/sql/ast/op_expr.go b/internal/sql/ast/op_expr.go index 5b371545dc..0c7c21726e 100644 --- a/internal/sql/ast/op_expr.go +++ b/internal/sql/ast/op_expr.go @@ -3,7 +3,6 @@ package ast type OpExpr struct { Xpr Node Opno Oid - Opfuncid Oid Opresulttype Oid Opretset bool Opcollid Oid diff --git a/internal/sql/ast/scalar_array_op_expr.go b/internal/sql/ast/scalar_array_op_expr.go index 6b9ad6ad8b..fc438c10b3 100644 --- a/internal/sql/ast/scalar_array_op_expr.go +++ b/internal/sql/ast/scalar_array_op_expr.go @@ -3,7 +3,6 @@ package ast type ScalarArrayOpExpr struct { Xpr Node Opno Oid - Opfuncid Oid UseOr bool Inputcollid Oid Args *List diff --git a/internal/sql/catalog/table.go b/internal/sql/catalog/table.go index bfa2da027e..dc30acfa1e 100644 --- a/internal/sql/catalog/table.go +++ b/internal/sql/catalog/table.go @@ -289,10 +289,6 @@ func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { } } - if stmt.ReferTable != nil && len(stmt.Cols) != 0 { - return errors.New("create table node cannot have both a ReferTable and Cols") - } - if stmt.ReferTable != nil { _, original, err := c.getTable(stmt.ReferTable) if err != nil { @@ -302,23 +298,23 @@ func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { newCol := *col // make a copy, so changes to the ReferTable don't propagate tbl.Columns = append(tbl.Columns, &newCol) } - } else { - for _, col := range stmt.Cols { - if notNull, ok := seen[col.Colname]; ok { - seen[col.Colname] = notNull || col.IsNotNull - if a, ok := coltype[col.Colname]; ok { - if !sameType(&a, col.TypeName) { - return fmt.Errorf("column %q has a type conflict", col.Colname) - } + } + + for _, col := range stmt.Cols { + if notNull, ok := seen[col.Colname]; ok { + seen[col.Colname] = notNull || col.IsNotNull + if a, ok := coltype[col.Colname]; ok { + if !sameType(&a, col.TypeName) { + return fmt.Errorf("column %q has a type conflict", col.Colname) } - continue } - tc, err := c.defineColumn(stmt.Name, col) - if err != nil { - return err - } - tbl.Columns = append(tbl.Columns, tc) + continue + } + tc, err := c.defineColumn(stmt.Name, col) + if err != nil { + return err } + tbl.Columns = append(tbl.Columns, tc) } // If one of the merged columns was not null, mark the column as not null diff --git a/internal/sql/sqlpath/read.go b/internal/sql/sqlpath/read.go index 24072001c9..278ebf3a05 100644 --- a/internal/sql/sqlpath/read.go +++ b/internal/sql/sqlpath/read.go @@ -9,14 +9,33 @@ import ( "github.com/sqlc-dev/sqlc/internal/migrations" ) -// Return a list of SQL files in the listed paths. Only includes files ending -// in .sql. Omits hidden files, directories, and migrations. -func Glob(paths []string) ([]string, error) { - var files []string +// Return a list of SQL files in the listed paths. +// +// Only includes files ending in .sql. Omits hidden files, directories, and +// down migrations. + +// If a path contains *, ?, [, or ], treat the path as a pattern and expand it +// filepath.Glob. +func Glob(patterns []string) ([]string, error) { + var files, paths []string + for _, pattern := range patterns { + if strings.ContainsAny(pattern, "*?[]") { + matches, err := filepath.Glob(pattern) + if err != nil { + return nil, err + } + // if len(matches) == 0 { + // slog.Warn("zero files matched", "pattern", pattern) + // } + paths = append(paths, matches...) + } else { + paths = append(paths, pattern) + } + } for _, path := range paths { f, err := os.Stat(path) if err != nil { - return nil, fmt.Errorf("path %s does not exist", path) + return nil, fmt.Errorf("path error: %w", err) } if f.IsDir() { listing, err := os.ReadDir(path) @@ -27,7 +46,7 @@ func Glob(paths []string) ([]string, error) { files = append(files, filepath.Join(path, f.Name())) } } else { - files = append(files, path) + files = append(files, filepath.Clean(path)) } } var sqlFiles []string diff --git a/internal/sql/sqlpath/read_test.go b/internal/sql/sqlpath/read_test.go new file mode 100644 index 0000000000..e4d959085b --- /dev/null +++ b/internal/sql/sqlpath/read_test.go @@ -0,0 +1,243 @@ +package sqlpath + +import ( + "fmt" + "path/filepath" + "strings" + "testing" + + "github.com/google/go-cmp/cmp" +) + +// Returns a list of SQL files from given paths. +func TestReturnsListOfSQLFiles(t *testing.T) { + // Arrange + paths := []string{"testdata/file1.sql", "testdata/file2.sql"} + + // Act + result, err := Glob(paths) + + // Assert + expected := []string{filepath.Join("testdata", "file1.sql"), filepath.Join("testdata", "file2.sql")} + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v, %v", expected, result, cmp.Diff(expected, result)) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestReturnsNilListWhenNoSQLFilesFound(t *testing.T) { + // Arrange + paths := []string{"testdata/extra.txt"} + + // Act + result, err := Glob(paths) + // Assert + var expected []string + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v, %v", expected, result, cmp.Diff(expected, result)) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestIgnoresHiddenFilesWhenSearchingForSQLFiles(t *testing.T) { + // Arrange + paths := []string{"testdata/.hidden.sql"} + + // Act + result, err := Glob(paths) + + // Assert + var expected []string + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestIgnoresNonSQLFilesWhenSearchingForSQLFiles(t *testing.T) { + // Arrange + paths := []string{"testdata/extra.txt"} + + // Act + result, err := Glob(paths) + + // Assert + var expected []string + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestExcludesSQLFilesEndingWithDownSQLWhenSearchingForSQLFiles(t *testing.T) { + // Arrange + paths := []string{"testdata/file1.sql", "testdata/file3.down.sql"} + + // Act + result, err := Glob(paths) + + // Assert + expected := []string{filepath.Join("testdata", "file1.sql")} + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestReturnsErrorWhenPathDoesNotExist(t *testing.T) { + // Arrange + paths := []string{"non_existent_path"} + + // Act + result, err := Glob(paths) + + // Assert + var expected []string + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err == nil { + t.Errorf("Expected an error, but got nil") + } else { + expectedError := fmt.Errorf("path error:") + if !strings.HasPrefix(err.Error(), expectedError.Error()) { + t.Errorf("Expected error %v, but got %v", expectedError, err) + } + } +} + +func TestReturnsErrorWhenDirectoryCannotBeRead(t *testing.T) { + // Arrange + paths := []string{"testdata/unreadable"} + + // Act + result, err := Glob(paths) + + // Assert + var expected []string + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err == nil { + t.Errorf("Expected an error, but got nil") + } else { + expectedError := fmt.Errorf("path error:") + if !strings.HasPrefix(err.Error(), expectedError.Error()) { + t.Errorf("Expected error %v, but got %v", expectedError, err) + } + } +} + +func TestDoesNotIncludesSQLFilesWithUppercaseExtension(t *testing.T) { + // Arrange + paths := []string{"testdata/file4.SQL"} + + // Act + result, err := Glob(paths) + + // Assert + var expected []string + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestNotIncludesHiddenFilesAnyPath(t *testing.T) { + // Arrange + paths := []string{ + "./testdata/.hiddendir/file1.sql", // pass + "./testdata/.hidden.sql", // skip + } + + // Act + result, err := Glob(paths) + + // Assert + expected := []string{filepath.Join("testdata", ".hiddendir", "file1.sql")} + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestFollowSymlinks(t *testing.T) { + // Arrange + paths := []string{"testdata/symlink", "testdata/file1.symlink.sql"} + + // Act + result, err := Glob(paths) + + // Assert + expected := []string{ + filepath.Join("testdata", "symlink", "file1.sql"), + filepath.Join("testdata", "symlink", "file1.symlink.sql"), + filepath.Join("testdata", "symlink", "file2.sql"), + filepath.Join("testdata", "file1.symlink.sql"), + } + if !cmp.Equal(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } + if err != nil { + t.Errorf("Expected no error, but got %v", err) + } +} + +func TestGlobPattern(t *testing.T) { + // Arrange + tests := []struct { + pattern string + expected []string + }{ + { + pattern: "testdata/glob/*/queries", + expected: []string{ + filepath.Join("testdata", "glob", "sub1", "queries", "file1.sql"), + filepath.Join("testdata", "glob", "sub2", "queries", "file2.sql"), + filepath.Join("testdata", "glob", "sub3", "queries", "file3.sql"), + filepath.Join("testdata", "glob", "sub3", "queries", "file4.sql"), + }, + }, + { + pattern: "testdata/glob/sub3/queries/file?.sql", + expected: []string{ + filepath.Join("testdata", "glob", "sub3", "queries", "file3.sql"), + filepath.Join("testdata", "glob", "sub3", "queries", "file4.sql"), + }, + }, + { + pattern: "testdata/glob/sub3/queries/file[1-5].sql", + expected: []string{ + filepath.Join("testdata", "glob", "sub3", "queries", "file3.sql"), + filepath.Join("testdata", "glob", "sub3", "queries", "file4.sql"), + }, + }, + } + + for _, test := range tests { + // Act + result, err := Glob([]string{test.pattern}) + + // Assert + if !cmp.Equal(result, test.expected) { + t.Errorf("Pattern %v: Expected %v, but got %v", test.pattern, test.expected, result) + } + if err != nil { + t.Errorf("Pattern %v: Expected no error, but got %v", test.pattern, err) + } + } +} diff --git a/examples/python/src/jets/__init__.py b/internal/sql/sqlpath/testdata/.hidden.sql similarity index 100% rename from examples/python/src/jets/__init__.py rename to internal/sql/sqlpath/testdata/.hidden.sql diff --git a/examples/python/src/ondeck/__init__.py b/internal/sql/sqlpath/testdata/.hiddendir/file1.sql similarity index 100% rename from examples/python/src/ondeck/__init__.py rename to internal/sql/sqlpath/testdata/.hiddendir/file1.sql diff --git a/examples/python/src/tests/__init__.py b/internal/sql/sqlpath/testdata/extra.txt similarity index 100% rename from examples/python/src/tests/__init__.py rename to internal/sql/sqlpath/testdata/extra.txt diff --git a/internal/endtoend/testdata/emit_pydantic_models/postgresql/__init__.py b/internal/sql/sqlpath/testdata/file1.sql similarity index 100% rename from internal/endtoend/testdata/emit_pydantic_models/postgresql/__init__.py rename to internal/sql/sqlpath/testdata/file1.sql diff --git a/internal/sql/sqlpath/testdata/file1.symlink.sql b/internal/sql/sqlpath/testdata/file1.symlink.sql new file mode 120000 index 0000000000..7c823b3226 --- /dev/null +++ b/internal/sql/sqlpath/testdata/file1.symlink.sql @@ -0,0 +1 @@ +./file1.sql \ No newline at end of file diff --git a/internal/sql/sqlpath/testdata/file2.sql b/internal/sql/sqlpath/testdata/file2.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/file3.down.sql b/internal/sql/sqlpath/testdata/file3.down.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/file4.SQL b/internal/sql/sqlpath/testdata/file4.SQL new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/glob/sub1/queries/file1.sql b/internal/sql/sqlpath/testdata/glob/sub1/queries/file1.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/glob/sub2/queries/file2.sql b/internal/sql/sqlpath/testdata/glob/sub2/queries/file2.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/glob/sub3/queries/file3.sql b/internal/sql/sqlpath/testdata/glob/sub3/queries/file3.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/glob/sub3/queries/file4.sql b/internal/sql/sqlpath/testdata/glob/sub3/queries/file4.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/subdir/file2.sql b/internal/sql/sqlpath/testdata/subdir/file2.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/sql/sqlpath/testdata/symlink b/internal/sql/sqlpath/testdata/symlink new file mode 120000 index 0000000000..945c9b46d6 --- /dev/null +++ b/internal/sql/sqlpath/testdata/symlink @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/internal/sql/validate/cmd.go b/internal/sql/validate/cmd.go index 7b9261e20c..66e849de6c 100644 --- a/internal/sql/validate/cmd.go +++ b/internal/sql/validate/cmd.go @@ -67,9 +67,11 @@ func Cmd(n ast.Node, name, cmd string) error { return validateCopyfrom(n) } if (cmd == metadata.CmdBatchExec || cmd == metadata.CmdBatchMany) || cmd == metadata.CmdBatchOne { - return validateBatch(n) + if err := validateBatch(n); err != nil { + return err + } } - if !(cmd == metadata.CmdMany || cmd == metadata.CmdOne) { + if !(cmd == metadata.CmdMany || cmd == metadata.CmdOne || cmd == metadata.CmdBatchMany || cmd == metadata.CmdBatchOne) { return nil } var list *ast.List diff --git a/internal/sqltest/docker/enabled.go b/internal/sqltest/docker/enabled.go new file mode 100644 index 0000000000..e17c0201b2 --- /dev/null +++ b/internal/sqltest/docker/enabled.go @@ -0,0 +1,17 @@ +package docker + +import ( + "fmt" + "os/exec" + + "golang.org/x/sync/singleflight" +) + +var flight singleflight.Group + +func Installed() error { + if _, err := exec.LookPath("docker"); err != nil { + return fmt.Errorf("docker not found: %w", err) + } + return nil +} diff --git a/internal/sqltest/docker/mysql.go b/internal/sqltest/docker/mysql.go new file mode 100644 index 0000000000..39a1af6160 --- /dev/null +++ b/internal/sqltest/docker/mysql.go @@ -0,0 +1,104 @@ +package docker + +import ( + "context" + "database/sql" + "fmt" + "os/exec" + "strings" + "time" + + _ "github.com/go-sql-driver/mysql" +) + +var mysqlHost string + +func StartMySQLServer(c context.Context) (string, error) { + if err := Installed(); err != nil { + return "", err + } + if mysqlHost != "" { + return mysqlHost, nil + } + value, err, _ := flight.Do("mysql", func() (interface{}, error) { + host, err := startMySQLServer(c) + if err != nil { + return "", err + } + mysqlHost = host + return host, nil + }) + if err != nil { + return "", err + } + data, ok := value.(string) + if !ok { + return "", fmt.Errorf("returned value was not a string") + } + return data, nil +} + +func startMySQLServer(c context.Context) (string, error) { + { + _, err := exec.Command("docker", "pull", "mysql:9").CombinedOutput() + if err != nil { + return "", fmt.Errorf("docker pull: mysql:9 %w", err) + } + } + + var exists bool + { + cmd := exec.Command("docker", "container", "inspect", "sqlc_sqltest_docker_mysql") + // This means we've already started the container + exists = cmd.Run() == nil + } + + if !exists { + cmd := exec.Command("docker", "run", + "--name", "sqlc_sqltest_docker_mysql", + "-e", "MYSQL_ROOT_PASSWORD=mysecretpassword", + "-e", "MYSQL_DATABASE=dinotest", + "-p", "3306:3306", + "-d", + "mysql:9", + ) + + output, err := cmd.CombinedOutput() + fmt.Println(string(output)) + + msg := `Conflict. The container name "/sqlc_sqltest_docker_mysql" is already in use by container` + if !strings.Contains(string(output), msg) && err != nil { + return "", err + } + } + + ctx, cancel := context.WithTimeout(c, 10*time.Second) + defer cancel() + + // Create a ticker that fires every 10ms + ticker := time.NewTicker(10 * time.Millisecond) + defer ticker.Stop() + + uri := "root:mysecretpassword@/dinotest?multiStatements=true&parseTime=true" + + db, err := sql.Open("mysql", uri) + if err != nil { + return "", fmt.Errorf("sql.Open: %w", err) + } + + defer db.Close() + + for { + select { + case <-ctx.Done(): + return "", fmt.Errorf("timeout reached: %w", ctx.Err()) + + case <-ticker.C: + // Run your function here + if err := db.PingContext(ctx); err != nil { + continue + } + return uri, nil + } + } +} diff --git a/internal/sqltest/docker/postgres.go b/internal/sqltest/docker/postgres.go new file mode 100644 index 0000000000..1b2d842c70 --- /dev/null +++ b/internal/sqltest/docker/postgres.go @@ -0,0 +1,105 @@ +package docker + +import ( + "context" + "fmt" + "log/slog" + "os/exec" + "strings" + "time" + + "github.com/jackc/pgx/v5" +) + +var postgresHost string + +func StartPostgreSQLServer(c context.Context) (string, error) { + if err := Installed(); err != nil { + return "", err + } + if postgresHost != "" { + return postgresHost, nil + } + value, err, _ := flight.Do("postgresql", func() (interface{}, error) { + host, err := startPostgreSQLServer(c) + if err != nil { + return "", err + } + postgresHost = host + return host, err + }) + if err != nil { + return "", err + } + data, ok := value.(string) + if !ok { + return "", fmt.Errorf("returned value was not a string") + } + return data, nil +} + +func startPostgreSQLServer(c context.Context) (string, error) { + { + _, err := exec.Command("docker", "pull", "postgres:16").CombinedOutput() + if err != nil { + return "", fmt.Errorf("docker pull: postgres:16 %w", err) + } + } + + uri := "postgres://postgres:mysecretpassword@localhost:5432/postgres?sslmode=disable" + + var exists bool + { + cmd := exec.Command("docker", "container", "inspect", "sqlc_sqltest_docker_postgres") + // This means we've already started the container + exists = cmd.Run() == nil + } + + if !exists { + cmd := exec.Command("docker", "run", + "--name", "sqlc_sqltest_docker_postgres", + "-e", "POSTGRES_PASSWORD=mysecretpassword", + "-e", "POSTGRES_USER=postgres", + "-p", "5432:5432", + "-d", + "postgres:16", + "-c", "max_connections=200", + ) + + output, err := cmd.CombinedOutput() + fmt.Println(string(output)) + + msg := `Conflict. The container name "/sqlc_sqltest_docker_postgres" is already in use by container` + if !strings.Contains(string(output), msg) && err != nil { + return "", err + } + } + + ctx, cancel := context.WithTimeout(c, 5*time.Second) + defer cancel() + + // Create a ticker that fires every 10ms + ticker := time.NewTicker(10 * time.Millisecond) + defer ticker.Stop() + + for { + select { + case <-ctx.Done(): + return "", fmt.Errorf("timeout reached: %w", ctx.Err()) + + case <-ticker.C: + // Run your function here + conn, err := pgx.Connect(ctx, uri) + if err != nil { + slog.Debug("sqltest", "connect", err) + continue + } + defer conn.Close(ctx) + if err := conn.Ping(ctx); err != nil { + slog.Error("sqltest", "ping", err) + continue + } + return uri, nil + } + } +} diff --git a/internal/sqltest/hosted/db.go b/internal/sqltest/hosted/db.go deleted file mode 100644 index 74bbf35421..0000000000 --- a/internal/sqltest/hosted/db.go +++ /dev/null @@ -1,78 +0,0 @@ -package hosted - -import ( - "context" - "fmt" - "os" - "sync" - "testing" - - "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 client pb.QuickClient -var once sync.Once - -func initClient() error { - projectID := os.Getenv("CI_SQLC_PROJECT_ID") - authToken := os.Getenv("CI_SQLC_AUTH_TOKEN") - if projectID == "" || authToken == "" { - return fmt.Errorf("missing project id or auth token") - } - c, err := quickdb.NewClient(projectID, authToken) - if err != nil { - return err - } - client = c - return nil -} - -func PostgreSQL(t *testing.T, migrations []string) string { - ctx := context.Background() - t.Helper() - - once.Do(func() { - if err := initClient(); err != nil { - t.Log(err) - } - }) - - if client == nil { - t.Skip("client init failed") - } - - var seed []string - files, err := sqlpath.Glob(migrations) - if err != nil { - t.Fatal(err) - } - for _, f := range files { - blob, err := os.ReadFile(f) - if err != nil { - t.Fatal(err) - } - seed = append(seed, string(blob)) - } - - resp, err := client.CreateEphemeralDatabase(ctx, &pb.CreateEphemeralDatabaseRequest{ - Engine: "postgresql", - Region: quickdb.GetClosestRegion(), - Migrations: seed, - }) - if err != nil { - t.Fatalf("region %s: %s", quickdb.GetClosestRegion(), err) - } - - t.Cleanup(func() { - _, err = client.DropEphemeralDatabase(ctx, &pb.DropEphemeralDatabaseRequest{ - DatabaseId: resp.DatabaseId, - }) - if err != nil { - t.Fatal(err) - } - }) - - return resp.Uri -} diff --git a/internal/sqltest/local/id.go b/internal/sqltest/local/id.go new file mode 100644 index 0000000000..919e2dca1d --- /dev/null +++ b/internal/sqltest/local/id.go @@ -0,0 +1,13 @@ +package local + +import "math/rand" + +var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + +func id() string { + b := make([]rune, 10) + for i := range b { + b[i] = letterRunes[rand.Intn(len(letterRunes))] + } + return string(b) +} diff --git a/internal/sqltest/local/mysql.go b/internal/sqltest/local/mysql.go new file mode 100644 index 0000000000..dedd3dfd78 --- /dev/null +++ b/internal/sqltest/local/mysql.go @@ -0,0 +1,101 @@ +package local + +import ( + "context" + "database/sql" + "fmt" + "os" + "strings" + "sync" + "testing" + + "github.com/go-sql-driver/mysql" + + migrate "github.com/sqlc-dev/sqlc/internal/migrations" + "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" + "github.com/sqlc-dev/sqlc/internal/sqltest/docker" +) + +var mysqlSync sync.Once +var mysqlPool *sql.DB + +func MySQL(t *testing.T, migrations []string) string { + ctx := context.Background() + t.Helper() + + dburi := os.Getenv("MYSQL_SERVER_URI") + if dburi == "" { + if ierr := docker.Installed(); ierr == nil { + u, err := docker.StartMySQLServer(ctx) + if err != nil { + t.Fatal(err) + } + dburi = u + } else { + t.Skip("MYSQL_SERVER_URI is empty") + } + } + + mysqlSync.Do(func() { + db, err := sql.Open("mysql", dburi) + if err != nil { + t.Fatal(err) + } + mysqlPool = db + }) + + if mysqlPool == nil { + t.Fatalf("MySQL pool creation failed") + } + + var seed []string + files, err := sqlpath.Glob(migrations) + if err != nil { + t.Fatal(err) + } + for _, f := range files { + blob, err := os.ReadFile(f) + if err != nil { + t.Fatal(err) + } + seed = append(seed, migrate.RemoveRollbackStatements(string(blob))) + } + + cfg, err := mysql.ParseDSN(dburi) + if err != nil { + t.Fatal(err) + } + + name := fmt.Sprintf("sqlc_test_%s", id()) + + if _, err := mysqlPool.ExecContext(ctx, fmt.Sprintf("CREATE DATABASE `%s`", name)); err != nil { + t.Fatal(err) + } + + cfg.DBName = name + + dropQuery := fmt.Sprintf("DROP DATABASE `%s`", name) + + t.Cleanup(func() { + if _, err := mysqlPool.ExecContext(ctx, dropQuery); err != nil { + t.Fatal(err) + } + }) + + db, err := sql.Open("mysql", cfg.FormatDSN()) + if err != nil { + t.Fatalf("connect %s: %s", name, err) + } + defer db.Close() + + for _, q := range seed { + if len(strings.TrimSpace(q)) == 0 { + continue + } + if _, err := db.ExecContext(ctx, q); err != nil { + t.Fatalf("%s: %s", q, err) + } + } + + return cfg.FormatDSN() +} diff --git a/internal/sqltest/local/postgres.go b/internal/sqltest/local/postgres.go new file mode 100644 index 0000000000..feda4cf7ac --- /dev/null +++ b/internal/sqltest/local/postgres.go @@ -0,0 +1,128 @@ +package local + +import ( + "context" + "fmt" + "hash/fnv" + "net/url" + "os" + "strings" + "testing" + + "github.com/jackc/pgx/v5" + "golang.org/x/sync/singleflight" + + migrate "github.com/sqlc-dev/sqlc/internal/migrations" + "github.com/sqlc-dev/sqlc/internal/pgx/poolcache" + "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" + "github.com/sqlc-dev/sqlc/internal/sqltest/docker" +) + +var flight singleflight.Group +var cache = poolcache.New() + +func PostgreSQL(t *testing.T, migrations []string) string { + return postgreSQL(t, migrations, true) +} + +func ReadOnlyPostgreSQL(t *testing.T, migrations []string) string { + return postgreSQL(t, migrations, false) +} + +func postgreSQL(t *testing.T, migrations []string, rw bool) string { + ctx := context.Background() + t.Helper() + + dburi := os.Getenv("POSTGRESQL_SERVER_URI") + if dburi == "" { + if ierr := docker.Installed(); ierr == nil { + u, err := docker.StartPostgreSQLServer(ctx) + if err != nil { + t.Fatal(err) + } + dburi = u + } else { + t.Skip("POSTGRESQL_SERVER_URI is empty") + } + } + + postgresPool, err := cache.Open(ctx, dburi) + if err != nil { + t.Fatalf("PostgreSQL pool creation failed: %s", err) + } + + var seed []string + files, err := sqlpath.Glob(migrations) + if err != nil { + t.Fatal(err) + } + + h := fnv.New64() + for _, f := range files { + blob, err := os.ReadFile(f) + if err != nil { + t.Fatal(err) + } + h.Write(blob) + seed = append(seed, migrate.RemoveRollbackStatements(string(blob))) + } + + var name string + if rw { + name = fmt.Sprintf("sqlc_test_%s", id()) + } else { + name = fmt.Sprintf("sqlc_test_%x", h.Sum(nil)) + } + + uri, err := url.Parse(dburi) + if err != nil { + t.Fatal(err) + } + uri.Path = name + dropQuery := fmt.Sprintf(`DROP DATABASE IF EXISTS "%s" WITH (FORCE)`, name) + + key := uri.String() + + _, err, _ = flight.Do(key, func() (interface{}, error) { + row := postgresPool.QueryRow(ctx, + fmt.Sprintf(`SELECT datname FROM pg_database WHERE datname = '%s'`, name)) + + var datname string + if err := row.Scan(&datname); err == nil { + t.Logf("database exists: %s", name) + return nil, nil + } + + t.Logf("creating database: %s", name) + if _, err := postgresPool.Exec(ctx, fmt.Sprintf(`CREATE DATABASE "%s"`, name)); err != nil { + return nil, err + } + + conn, err := pgx.Connect(ctx, uri.String()) + if err != nil { + return nil, fmt.Errorf("connect %s: %s", name, err) + } + defer conn.Close(ctx) + + for _, q := range seed { + if len(strings.TrimSpace(q)) == 0 { + continue + } + if _, err := conn.Exec(ctx, q); err != nil { + return nil, fmt.Errorf("%s: %s", q, err) + } + } + return nil, nil + }) + if rw || err != nil { + t.Cleanup(func() { + if _, err := postgresPool.Exec(ctx, dropQuery); err != nil { + t.Fatalf("failed cleaning up: %s", err) + } + }) + } + if err != nil { + t.Fatalf("create db: %s", err) + } + return key +} diff --git a/internal/sqltest/mysql.go b/internal/sqltest/mysql.go index a1fbf41571..bddfe0042c 100644 --- a/internal/sqltest/mysql.go +++ b/internal/sqltest/mysql.go @@ -7,9 +7,9 @@ import ( "path/filepath" "testing" - "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" - _ "github.com/go-sql-driver/mysql" + + "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) func MySQL(t *testing.T, migrations []string) (*sql.DB, func()) { diff --git a/internal/sqltest/sqlite.go b/internal/sqltest/sqlite.go index cd7eff3872..0e5161967d 100644 --- a/internal/sqltest/sqlite.go +++ b/internal/sqltest/sqlite.go @@ -7,8 +7,6 @@ import ( "testing" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" - - _ "github.com/mattn/go-sqlite3" ) func SQLite(t *testing.T, migrations []string) (*sql.DB, func()) { @@ -18,6 +16,9 @@ func SQLite(t *testing.T, migrations []string) (*sql.DB, func()) { if err != nil { t.Fatal(err) } + if err := source.Close(); err != nil { + t.Fatal(err) + } return CreateSQLiteDatabase(t, source.Name(), migrations) } @@ -25,7 +26,7 @@ func CreateSQLiteDatabase(t *testing.T, path string, migrations []string) (*sql. t.Helper() t.Logf("open %s\n", path) - sdb, err := sql.Open("sqlite3", path) + sdb, err := sql.Open("sqlite", path) if err != nil { t.Fatal(err) } diff --git a/internal/sqltest/sqlite_modernc.go b/internal/sqltest/sqlite_modernc.go new file mode 100644 index 0000000000..708ea40e49 --- /dev/null +++ b/internal/sqltest/sqlite_modernc.go @@ -0,0 +1,7 @@ +//go:build !wasm + +package sqltest + +import ( + _ "modernc.org/sqlite" +) diff --git a/protos/analysis/analysis.proto b/protos/analysis/analysis.proto index 39febb45c6..60e53b56f1 100644 --- a/protos/analysis/analysis.proto +++ b/protos/analysis/analysis.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package analysis; -option go_package = "github.com/sqlc-dev/sqlc/internal/analysis"; - message Identifier { string catalog = 1; string schema = 2; diff --git a/protos/buf.yaml b/protos/buf.yaml index d2120761b6..998cf114e8 100644 --- a/protos/buf.yaml +++ b/protos/buf.yaml @@ -1,8 +1,8 @@ version: v1 -name: github.com/sqlc-dev/sqlc +name: buf.build/sqlc/sqlc breaking: lint: use: - DEFAULT except: - - PACKAGE_VERSION_SUFFIX \ No newline at end of file + - PACKAGE_VERSION_SUFFIX diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index 380ecf2777..e6faf19bad 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -2,60 +2,28 @@ syntax = "proto3"; package plugin; -option go_package = "github.com/sqlc-dev/sqlc/internal/plugin"; +service CodegenService { + rpc Generate (GenerateRequest) returns (GenerateResponse); +} message File { string name = 1 [json_name = "name"]; bytes contents = 2 [json_name = "contents"]; } -message Override { - // PythonType message was field 9 - reserved 9; - - // name of the type to use, e.g. `github.com/segmentio/ksuid.KSUID` or `mymodule.Type` - string code_type = 1 [json_name = "code_type"]; - - // name of the type to use, e.g. `text` - string db_type = 3 [json_name = "db_type"]; - - // True if the override should apply to a nullable database type - bool nullable = 5 [json_name = "nullable"]; - - // fully qualified name of the column, e.g. `accounts.id` - string column = 6 [json_name = "column"]; - - Identifier table = 7 [json_name = "table"]; - - string column_name = 8 [json_name = "column_name"]; - - ParsedGoType go_type = 10; - - // True if the override should apply to a unsigned database type - bool unsigned = 11 [json_name = "unsigned"]; -} - -message ParsedGoType { - string import_path = 1; - string package = 2; - string type_name = 3; - bool basic_type = 4; - map struct_tags = 5; -} - message Settings { + // Rename message was field 5 + // Overides message was field 6 // PythonCode message was field 8 // KotlinCode message was field 9 // GoCode message was field 10; // JSONCode message was field 11; - reserved 8, 9, 10, 11; + reserved 5, 8, 9, 10, 11; string version = 1 [json_name = "version"]; string engine = 2 [json_name = "engine"]; repeated string schema = 3 [json_name = "schema"]; repeated string queries = 4 [json_name = "queries"]; - map rename = 5 [json_name = "rename"]; - repeated Override overrides = 6 [json_name = "overrides"]; Codegen codegen = 12 [json_name = "codegen"]; } @@ -150,14 +118,15 @@ message Parameter { Column column = 2 [json_name = "column"]; } -message CodeGenRequest { +message GenerateRequest { Settings settings = 1 [json_name = "settings"]; Catalog catalog = 2 [json_name = "catalog"]; repeated Query queries = 3 [json_name = "queries"]; string sqlc_version = 4 [json_name = "sqlc_version"]; bytes plugin_options = 5 [json_name = "plugin_options"]; + bytes global_options = 6 [json_name = "global_options"]; } -message CodeGenResponse { +message GenerateResponse { repeated File files = 1 [json_name = "files"]; } diff --git a/protos/vet/vet.proto b/protos/vet/vet.proto index 198c724408..9a5ded68ea 100644 --- a/protos/vet/vet.proto +++ b/protos/vet/vet.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package vet; -option go_package = "github.com/sqlc-dev/sqlc/internal/vet"; - message Parameter { int32 number = 1 [json_name = "number"]; } diff --git a/scripts/cleanup-test-dbs/main.go b/scripts/cleanup-test-dbs/main.go new file mode 100644 index 0000000000..51093db307 --- /dev/null +++ b/scripts/cleanup-test-dbs/main.go @@ -0,0 +1,55 @@ +package main + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgxpool" +) + +func main() { + if err := run(); err != nil { + log.Fatal(err) + } +} + +const query = ` +SELECT datname +FROM pg_database +WHERE datname LIKE 'sqlc_test_%' +` + +func run() error { + ctx := context.Background() + dburi := os.Getenv("POSTGRESQL_SERVER_URI") + if dburi == "" { + return fmt.Errorf("POSTGRESQL_SERVER_URI is empty") + } + pool, err := pgxpool.New(ctx, dburi) + if err != nil { + return err + } + + rows, err := pool.Query(ctx, query) + if err != nil { + return err + } + + names, err := pgx.CollectRows(rows, pgx.RowTo[string]) + if err != nil { + return err + } + + for _, name := range names { + drop := fmt.Sprintf(`DROP DATABASE IF EXISTS "%s" WITH (FORCE)`, name) + if _, err := pool.Exec(ctx, drop); err != nil { + return err + } + log.Println("dropping database", name) + } + + return nil +} diff --git a/scripts/mirror-go-plugin/main.go b/scripts/mirror-go-plugin/main.go new file mode 100644 index 0000000000..48277dc373 --- /dev/null +++ b/scripts/mirror-go-plugin/main.go @@ -0,0 +1,88 @@ +package main + +import ( + "bytes" + "flag" + "fmt" + "io/fs" + "log" + "os" + "path/filepath" + "strings" +) + +func main() { + flag.Parse() + // Assume it exists + loc := flag.Arg(0) + + dir := filepath.Join("internal", "codegen", "golang") + err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + return nil + } + contents, err := os.ReadFile(path) + if err != nil { + return err + } + + newdir := filepath.Join(loc, "internal") + newpath := strings.Replace(path, dir, newdir, 1) + + os.MkdirAll(filepath.Dir(newpath), 0755) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/codegen/golang/opts"`), + []byte(`"github.com/sqlc-dev/sqlc-gen-go/internal/opts"`)) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/plugin"`), + []byte(`"github.com/sqlc-dev/plugin-sdk-go/plugin"`)) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/codegen/sdk"`), + []byte(`"github.com/sqlc-dev/plugin-sdk-go/sdk"`)) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/metadata"`), + []byte(`"github.com/sqlc-dev/plugin-sdk-go/metadata"`)) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/pattern"`), + []byte(`"github.com/sqlc-dev/plugin-sdk-go/pattern"`)) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/debug"`), + []byte(`"github.com/sqlc-dev/sqlc-gen-go/internal/debug"`)) + + contents = bytes.ReplaceAll(contents, + []byte(`"github.com/sqlc-dev/sqlc/internal/inflection"`), + []byte(`"github.com/sqlc-dev/sqlc-gen-go/internal/inflection"`)) + + if err := os.WriteFile(newpath, contents, 0644); err != nil { + return err + } + return nil + }) + + if err != nil { + fmt.Printf("error walking the path: %v\n", err) + return + } + + { + path := filepath.Join("internal", "inflection", "singular.go") + contents, err := os.ReadFile(path) + if err != nil { + log.Fatal(err) + } + newpath := filepath.Join(loc, "internal", "inflection", "singular.go") + if err := os.WriteFile(newpath, contents, 0644); err != nil { + log.Fatal(err) + } + } + +} diff --git a/scripts/regenerate/main.go b/scripts/regenerate/main.go deleted file mode 100644 index c1a578b62d..0000000000 --- a/scripts/regenerate/main.go +++ /dev/null @@ -1,85 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "log" - "os" - "os/exec" - "path/filepath" - "strings" -) - -func parseExecCommand(path string) (string, error) { - var exec = struct { - Command string `json:"command"` - }{ - Command: "generate", - } - - execJsonPath := filepath.Join(path, "exec.json") - if _, err := os.Stat(execJsonPath); !os.IsNotExist(err) { - blob, err := os.ReadFile(execJsonPath) - if err != nil { - return "", err - } - if err := json.Unmarshal(blob, &exec); err != nil { - return "", err - } - } - - return exec.Command, nil -} - -func regenerate(dir string) error { - return filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() { - return nil - } - 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 { - return fmt.Errorf("failed to parse exec.json: %w", err) - } - - if command != "generate" { - return nil - } - - var expectFailure bool - if _, err := os.Stat(filepath.Join(cwd, "stderr.txt")); !os.IsNotExist(err) { - expectFailure = true - } - - cmd := exec.Command("sqlc-dev", "generate") - cmd.Env = append(cmd.Env, "SQLC_DUMMY_VALUE=true") - cmd.Dir = cwd - out, failed := cmd.CombinedOutput() - if failed != nil && !expectFailure { - return fmt.Errorf("%s: sqlc-dev generate failed\n%s", cwd, out) - } - if expectFailure { - if err := os.WriteFile(filepath.Join(cwd, "stderr.txt"), out, 0644); err != nil { - return fmt.Errorf("failed to update stderr.txt: %v", err) - } - } - } - return nil - }) -} - -func main() { - dirs := []string{ - filepath.Join("internal", "endtoend", "testdata"), - filepath.Join("examples"), - } - for _, d := range dirs { - if err := regenerate(d); err != nil { - log.Fatal(err) - } - } -} diff --git a/scripts/test-json-process-plugin/main.go b/scripts/test-json-process-plugin/main.go new file mode 100644 index 0000000000..6bcc7a25d0 --- /dev/null +++ b/scripts/test-json-process-plugin/main.go @@ -0,0 +1,39 @@ +package main + +import ( + "bytes" + "encoding/json" + "fmt" + "os" +) + +type Out struct { + Files []File `json:"files"` +} + +type File struct { + Name string `json:"name"` + Contents []byte `json:"contents"` +} + +func main() { + in := make(map[string]interface{}) + decoder := json.NewDecoder(os.Stdin) + err := decoder.Decode(&in) + if err != nil { + fmt.Fprintf(os.Stderr, "error generating JSON: %s", err) + os.Exit(2) + } + + buf := bytes.NewBuffer(nil) + queries := in["queries"].([]interface{}) + for _, q := range queries { + text := q.(map[string]interface{})["text"].(string) + buf.WriteString(text) + buf.WriteString("\n") + } + + e := json.NewEncoder(os.Stdout) + e.SetIndent("", " ") + e.Encode(&Out{Files: []File{{Name: "hello.txt", Contents: buf.Bytes()}}}) +}